From 37de252739c71a0eb36ea2adb8353d44236d137e Mon Sep 17 00:00:00 2001 From: kingwl Date: Mon, 22 Jun 2020 15:43:41 +0800 Subject: [PATCH 1/7] Reduce rest parameter reduce if not referenced --- src/compiler/checker.ts | 20 +- src/compiler/transformers/es2015.ts | 8 + src/compiler/types.ts | 20 +- .../reference/accessorWithRestParam.js | 14 +- .../arrayLiteralInNonVarArgParameter.js | 7 +- ...patWithCallSignaturesWithRestParameters.js | 56 +- .../reference/asyncArrowFunction11_es5.js | 32 +- .../reference/baseTypeAfterDerivedType.js | 7 +- tests/baselines/reference/callWithSpread.js | 8 - .../checkSuperCallBeforeThisAccessing5.js | 4 - .../checkSuperCallBeforeThisAccessing6.js | 4 - .../checkSuperCallBeforeThisAccessing8.js | 4 - .../collisionArgumentsArrowFunctions.js | 12 - .../collisionArgumentsClassConstructor.js | 24 - .../collisionArgumentsClassMethod.js | 20 - .../reference/collisionArgumentsFunction.js | 20 - .../collisionArgumentsFunctionExpressions.js | 20 - .../collisionRestParameterArrowFunctions.js | 8 - .../collisionRestParameterClassConstructor.js | 16 - .../collisionRestParameterClassMethod.js | 12 - .../collisionRestParameterFunction.js | 12 - ...llisionRestParameterFunctionExpressions.js | 12 - .../collisionRestParameterUnderscoreIUsage.js | 4 - ...constructorWithIncompleteTypeAnnotation.js | 4 - ...extuallyTypedParametersWithInitializers.js | 16 +- .../baselines/reference/declFileFunctions.js | 4 - ...RestParametersOfFunctionAndFunctionType.js | 7 +- ...ingOptionalBindingParametersInOverloads.js | 8 - .../declarationEmitIndexTypeArray.js | 7 +- ...orMetadataRestParameterWithImportedType.js | 4 - .../decoratorReferenceOnOtherProperty.js | 21 +- .../reference/defaultExportWithOverloads01.js | 4 - ...cturingParameterDeclaration3ES5iterable.js | 49 +- .../destructuringParameterDeclaration4.js | 46 +- .../destructuringParameterDeclaration6.js | 21 +- ...detachedCommentAtStartOfLambdaFunction1.js | 4 - ...detachedCommentAtStartOfLambdaFunction2.js | 4 - .../disallowLineTerminatorBeforeArrow.js | 28 +- ...erBindingElementInParameterDeclaration1.js | 4 - ...erBindingElementInParameterDeclaration2.js | 4 - .../baselines/reference/emitArrowFunction.js | 7 +- .../emitDecoratorMetadata_restArgs.js | 22 +- .../emitDefaultParametersFunction.js | 8 - ...emitDefaultParametersFunctionExpression.js | 20 - .../emitDefaultParametersFunctionProperty.js | 8 - .../reference/emitDefaultParametersMethod.js | 12 - .../reference/emitRestParametersFunction.js | 14 +- .../emitRestParametersFunctionExpression.js | 28 +- .../emitRestParametersFunctionProperty.js | 7 +- .../reference/emitRestParametersMethod.js | 36 +- tests/baselines/reference/es6ClassTest2.js | 11 +- .../reference/es6modulekindWithES5Target6.js | 4 - .../esnextmodulekindWithES5Target6.js | 4 - .../reference/fatarrowfunctionsErrors.js | 15 +- .../fatarrowfunctionsOptionalArgs.js | 103 +-- .../fatarrowfunctionsOptionalArgsErrors1.js | 24 +- .../fatarrowfunctionsOptionalArgsErrors3.js | 8 +- .../fatarrowfunctionsOptionalArgsErrors4.js | 12 +- tests/baselines/reference/functionCall10.js | 7 +- tests/baselines/reference/functionCall13.js | 7 +- tests/baselines/reference/functionCall14.js | 7 +- tests/baselines/reference/functionCall15.js | 7 +- tests/baselines/reference/functionCall16.js | 7 +- tests/baselines/reference/functionCall17.js | 7 +- ...tionOverloadsRecursiveGenericReturnType.js | 4 - ...tionWithUseStrictAndSimpleParameterList.js | 8 - tests/baselines/reference/genericRestTypes.js | 16 +- .../identicalTypesNoDifferByCheckOrder.js | 14 +- ...icitAnyDeclareFunctionWithoutFormalType.js | 7 +- .../inferFromGenericFunctionReturnTypes1.js | 4 - .../inferFromGenericFunctionReturnTypes2.js | 4 - ...eArgumentsInSignatureWithRestParameters.js | 21 +- tests/baselines/reference/inferTypes1.js | 4 - .../inheritedConstructorWithRestParams.js | 4 - ...ggedTemplateEscapeSequences(target=es5).js | 4 - .../reference/jsxNamespaceReexports.js | 7 +- .../reference/mixinAccessModifiers.js | 24 - tests/baselines/reference/newWithSpread.js | 12 - tests/baselines/reference/newWithSpreadES5.js | 15 +- .../noImplicitAnyParametersInBareFunctions.js | 30 +- .../noImplicitAnyParametersInClass.js | 60 +- .../noImplicitAnyParametersInModule.js | 30 +- tests/baselines/reference/nonArrayRestArgs.js | 4 - .../optionalBindingParametersInOverloads1.js | 4 - .../optionalBindingParametersInOverloads2.js | 4 - .../overloadGenericFunctionWithRestArgs.js | 4 - ...ConstructorFixesInferencesAppropriately.js | 4 - .../reference/parameterListAsTupleType.js | 11 +- .../parenthesizedContexualTyping2.js | 4 - tests/baselines/reference/parser509668.js | 4 - .../parserMemberAccessorDeclaration18.js | 7 +- .../reference/parserParameterList10.js | 7 +- .../reference/parserParameterList11.js | 8 +- .../reference/parserParameterList9.js | 7 +- ...tatedFunctionInferenceWithTypeParameter.js | 21 +- .../reference/recursiveTypeRelations.js | 4 - .../requiredInitializedParameter1.js | 4 - .../baselines/reference/restArgMissingName.js | 7 +- .../reference/restParamAsOptional.js | 14 +- .../baselines/reference/restParamModifier2.js | 4 - .../restParameterAssignmentCompatibility.js | 4 - .../restParameterNoTypeAnnotation.js | 4 - .../restParameterWithBindingPattern1.js | 8 +- .../restParameterWithBindingPattern1.js.map | 4 +- ...ParameterWithBindingPattern1.sourcemap.txt | 83 +- .../restParameterWithBindingPattern2.js | 8 +- .../restParameterWithBindingPattern2.js.map | 4 +- ...ParameterWithBindingPattern2.sourcemap.txt | 83 +- .../restParameterWithBindingPattern3.js | 40 +- ...estParameterWithoutAnnotationIsAnyArray.js | 49 +- tests/baselines/reference/restParameters.js | 28 +- .../restParametersOfNonArrayTypes.js | 49 +- .../restParametersOfNonArrayTypes2.js | 98 +-- .../restParametersWithArrayTypeAnnotations.js | 98 +-- .../reference/restParamsWithNonRestParams.js | 21 +- .../restTuplesFromContextualTypes.js | 232 +----- .../reference/sourceMapValidationClass.js | 4 - .../reference/sourceMapValidationClass.js.map | 4 +- .../sourceMapValidationClass.sourcemap.txt | 181 ++-- .../sourceMapValidationDecorators.js | 4 - .../sourceMapValidationDecorators.js.map | 4 +- ...ourceMapValidationDecorators.sourcemap.txt | 375 ++++----- .../reference/sourceMapValidationFunctions.js | 8 - .../sourceMapValidationFunctions.js.map | 4 +- ...sourceMapValidationFunctions.sourcemap.txt | 134 +-- .../stringLiteralTypeIsSubtypeOfString.js | 8 +- .../stringLiteralTypesOverloads03.js | 8 - .../reference/subtypingWithCallSignatures2.js | 8 +- .../reference/subtypingWithCallSignatures3.js | 16 +- ...taggedTemplateStringsHexadecimalEscapes.js | 4 - ...sPlainCharactersThatArePartsOfEscapes01.js | 4 - ...aggedTemplateStringsWithCurriedFunction.js | 8 +- ...gedTemplateStringsWithMultilineTemplate.js | 4 - ...dTemplateStringsWithOverloadResolution1.js | 4 - ...dTemplateStringsWithOverloadResolution2.js | 8 - ...aggedTemplateStringsWithTagNamedDeclare.js | 4 - ...tionExpressionsInSubstitutionExpression.js | 4 - ...taggedTemplateStringsWithUnicodeEscapes.js | 4 - ...gedTemplateStringsWithWhitespaceEscapes.js | 4 - .../taggedTemplatesInDifferentScopes.js | 4 - ...gCommasInFunctionParametersAndArguments.js | 7 +- .../multiple-emitHelpers-in-all-projects.js | 618 ++++++-------- .../multiple-emitHelpers-in-all-projects.js | 486 ++++------- .../multiple-emitHelpers-in-all-projects.js | 586 +++++-------- .../multiple-emitHelpers-in-all-projects.js | 678 ++++++--------- ...tiple-emitHelpers-in-different-projects.js | 244 +++--- .../multiple-emitHelpers-in-all-projects.js | 678 ++++++--------- ...tiple-emitHelpers-in-different-projects.js | 244 +++--- .../multiple-emitHelpers-in-all-projects.js | 778 ++++++------------ ...tiple-emitHelpers-in-different-projects.js | 390 ++++----- .../initial-build/noEmit-changes-composite.js | 4 - .../noEmit-changes-incremental-declaration.js | 4 - .../noEmit-changes-incremental.js | 4 - ...t-changes-with-initial-noEmit-composite.js | 4 - ...-initial-noEmit-incremental-declaration.js | 4 - ...changes-with-initial-noEmit-incremental.js | 4 - .../tsxAttributesHasInferrableIndex.js | 4 - .../reference/typeGuardFunctionErrors.js | 4 - .../reference/undeclaredModuleError.js | 7 +- tests/baselines/reference/underscoreTest1.js | 7 +- .../reference/unionTypeCallSignatures3.js | 21 +- .../unusedParametersWithUnderscore.js | 8 - .../varArgConstructorMemberParameter.js | 8 - .../reference/varArgParamTypeCheck.js | 4 - .../reference/varArgWithNoParamName.js | 7 +- tests/baselines/reference/vararg.js | 4 - 166 files changed, 2258 insertions(+), 5526 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 595a64777c605..2e4c0b58b9477 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -21693,6 +21693,18 @@ namespace ts { return getTypeOfSymbol(symbol); } + if ((symbol.flags & SymbolFlags.Value) && symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isRestParameter(symbol.valueDeclaration)) { + const containerFunctionLikeDeclaration = findAncestor(symbol.valueDeclaration, isFunctionLikeDeclaration); + if (containerFunctionLikeDeclaration) { + const topLevelStatementInContainer = findAncestor(node, n => { + return n.parent && (isBlock(n.parent) ? n.parent.parent === containerFunctionLikeDeclaration : n.parent === containerFunctionLikeDeclaration); + }) + if (topLevelStatementInContainer) { + (>topLevelStatementInContainer).flags |= NodeFlags.ContainsRestParameterReference; + } + } + } + // We should only mark aliases as referenced if there isn't a local value declaration // for the symbol. Also, don't mark any property access expression LHS - checkPropertyAccessExpression will handle that if (!(node.parent && isPropertyAccessExpression(node.parent) && node.parent.expression === node)) { @@ -21787,7 +21799,7 @@ namespace ts { // The declaration container is the innermost function that encloses the declaration of the variable // or parameter. The flow container is the innermost function starting with which we analyze the control // flow graph to determine the control flow based type. - const isParameter = getRootDeclaration(declaration).kind === SyntaxKind.Parameter; + const isParameterDecl = getRootDeclaration(declaration).kind === SyntaxKind.Parameter; const declarationContainer = getControlFlowContainer(declaration); let flowContainer = getControlFlowContainer(node); const isOuterVariable = flowContainer !== declarationContainer; @@ -21798,19 +21810,19 @@ namespace ts { // analysis to include the immediately enclosing function. while (flowContainer !== declarationContainer && (flowContainer.kind === SyntaxKind.FunctionExpression || flowContainer.kind === SyntaxKind.ArrowFunction || isObjectLiteralOrClassExpressionMethod(flowContainer)) && - (isConstVariable(localOrExportSymbol) || isParameter && !isParameterAssigned(localOrExportSymbol))) { + (isConstVariable(localOrExportSymbol) || isParameterDecl && !isParameterAssigned(localOrExportSymbol))) { flowContainer = getControlFlowContainer(flowContainer); } // We only look for uninitialized variables in strict null checking mode, and only when we can analyze // the entire control flow graph from the variable's declaration (i.e. when the flow container and // declaration container are the same). - const assumeInitialized = isParameter || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isBindingElement(declaration) || + const assumeInitialized = isParameterDecl || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isBindingElement(declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (TypeFlags.AnyOrUnknown | TypeFlags.Void)) !== 0 || isInTypeQuery(node) || node.parent.kind === SyntaxKind.ExportSpecifier) || node.parent.kind === SyntaxKind.NonNullExpression || declaration.kind === SyntaxKind.VariableDeclaration && (declaration).exclamationToken || declaration.flags & NodeFlags.Ambient; - const initialType = assumeInitialized ? (isParameter ? removeOptionalityFromDeclaredType(type, declaration as VariableLikeDeclaration) : type) : + const initialType = assumeInitialized ? (isParameterDecl ? removeOptionalityFromDeclaredType(type, declaration as VariableLikeDeclaration) : type) : type === autoType || type === autoArrayType ? undefinedType : getOptionalType(type); const flowType = getFlowTypeOfReference(node, type, initialType, flowContainer, !assumeInitialized); diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index dc4078caa2433..9e96db984c6f8 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -1354,6 +1354,14 @@ namespace ts { return false; } + const firstStatementContainsRestParameter = node.body && (isBlock(node.body) ? + find(node.body.statements, stmt => !!(stmt.flags & NodeFlags.ContainsRestParameterReference)) : + (node.body.flags & NodeFlags.ContainsRestParameterReference) ? node.body : undefined + ); + if (!firstStatementContainsRestParameter) { + return false; + } + // `declarationName` is the name of the local declaration for the parameter. // TODO(rbuckton): Does this need to be parented? const declarationName = parameter.name.kind === SyntaxKind.Identifier ? setParent(setTextRange(factory.cloneNode(parameter.name), parameter.name), parameter.name.parent) : factory.createTempVariable(/*recordTempVariable*/ undefined); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index d6c06ebec5ff0..5b2f8898f4746 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -746,15 +746,17 @@ namespace ts { // removal, it is likely that users will add the import anyway. // The advantage of this approach is its simplicity. For the case of batch compilation, // we guarantee that users won't have to pay the price of walking the tree if a dynamic import isn't used. - /* @internal */ PossiblyContainsDynamicImport = 1 << 20, - /* @internal */ PossiblyContainsImportMeta = 1 << 21, - - JSDoc = 1 << 22, // If node was parsed inside jsdoc - /* @internal */ Ambient = 1 << 23, // If node was inside an ambient context -- a declaration file, or inside something with the `declare` modifier. - /* @internal */ InWithStatement = 1 << 24, // If any ancestor of node was the `statement` of a WithStatement (not the `expression`) - JsonFile = 1 << 25, // If node was parsed in a Json - /* @internal */ TypeCached = 1 << 26, // If a type was cached for node at any point - /* @internal */ Deprecated = 1 << 27, // If has '@deprecated' JSDoc tag + /* @internal */ PossiblyContainsDynamicImport = 1 << 20, + /* @internal */ PossiblyContainsImportMeta = 1 << 21, + + JSDoc = 1 << 22, // If node was parsed inside jsdoc + /* @internal */ Ambient = 1 << 23, // If node was inside an ambient context -- a declaration file, or inside something with the `declare` modifier. + /* @internal */ InWithStatement = 1 << 24, // If any ancestor of node was the `statement` of a WithStatement (not the `expression`) + JsonFile = 1 << 25, // If node was parsed in a Json + /* @internal */ TypeCached = 1 << 26, // If a type was cached for node at any point + /* @internal */ Deprecated = 1 << 27, // If has '@deprecated' JSDoc tag + + /* @internal */ ContainsRestParameterReference = 1 << 28, // If contains rest parameter reference BlockScoped = Let | Const, diff --git a/tests/baselines/reference/accessorWithRestParam.js b/tests/baselines/reference/accessorWithRestParam.js index c9afc192f5064..10d2eb08f0bf9 100644 --- a/tests/baselines/reference/accessorWithRestParam.js +++ b/tests/baselines/reference/accessorWithRestParam.js @@ -9,22 +9,12 @@ var C = /** @class */ (function () { function C() { } Object.defineProperty(C.prototype, "X", { - set: function () { - var v = []; - for (var _i = 0; _i < arguments.length; _i++) { - v[_i] = arguments[_i]; - } - }, + set: function () { }, enumerable: false, configurable: true }); Object.defineProperty(C, "X", { - set: function () { - var v2 = []; - for (var _i = 0; _i < arguments.length; _i++) { - v2[_i] = arguments[_i]; - } - }, + set: function () { }, enumerable: false, configurable: true }); diff --git a/tests/baselines/reference/arrayLiteralInNonVarArgParameter.js b/tests/baselines/reference/arrayLiteralInNonVarArgParameter.js index 57cba07d6bf16..9edf545f8b4d7 100644 --- a/tests/baselines/reference/arrayLiteralInNonVarArgParameter.js +++ b/tests/baselines/reference/arrayLiteralInNonVarArgParameter.js @@ -5,10 +5,5 @@ panic([], 'one', 'two'); //// [arrayLiteralInNonVarArgParameter.js] -function panic(val) { - var opt = []; - for (var _i = 1; _i < arguments.length; _i++) { - opt[_i - 1] = arguments[_i]; - } -} +function panic(val) { } panic([], 'one', 'two'); diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.js b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.js index ec86f218ac0f9..9c878e2c4c090 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.js @@ -49,49 +49,19 @@ var a4: (x?: number, y?: string, ...z: number[]) => number; // call signatures in derived types must have the same or fewer optional parameters as the target for assignment var a; // ok, same number of required params a = function () { return 1; }; // ok, same number of required params -a = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return 1; -}; // ok, same number of required params -a = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return 1; -}; // error, type mismatch +a = function () { return 1; }; // ok, same number of required params +a = function () { return 1; }; // error, type mismatch a = function (x) { return 1; }; // ok, same number of required params a = function (x, y, z) { return 1; }; // ok, same number of required params a = function (x) { return 1; }; // ok, rest param corresponds to infinite number of params a = function (x) { return 1; }; // error, incompatible type var a2; a2 = function () { return 1; }; // ok, fewer required params -a2 = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return 1; -}; // ok, fewer required params +a2 = function () { return 1; }; // ok, fewer required params a2 = function (x) { return 1; }; // ok, fewer required params a2 = function (x) { return 1; }; // ok, same number of required params -a2 = function (x) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - return 1; -}; // ok, same number of required params -a2 = function (x) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - return 1; -}; // should be type mismatch error +a2 = function (x) { return 1; }; // ok, same number of required params +a2 = function (x) { return 1; }; // should be type mismatch error a2 = function (x, y) { return 1; }; // ok, rest param corresponds to infinite number of params a2 = function (x, y) { return 1; }; // ok, same number of required params var a3; @@ -100,13 +70,7 @@ a3 = function (x) { return 1; }; // ok, fewer required params a3 = function (x) { return 1; }; // ok, same number of required params a3 = function (x, y) { return 1; }; // ok, all present params match a3 = function (x, y, z) { return 1; }; // error -a3 = function (x) { - var z = []; - for (var _i = 1; _i < arguments.length; _i++) { - z[_i - 1] = arguments[_i]; - } - return 1; -}; // error +a3 = function (x) { return 1; }; // error a3 = function (x, y, z) { return 1; }; // error var a4; a4 = function () { return 1; }; // ok, fewer required params @@ -114,10 +78,4 @@ a4 = function (x, y) { return 1; }; // error, type mismatch a4 = function (x) { return 1; }; // ok, all present params match a4 = function (x, y) { return 1; }; // error, second param has type mismatch a4 = function (x, y) { return 1; }; // ok, same number of required params with matching types -a4 = function (x) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - return 1; -}; // error, rest params have type mismatch +a4 = function (x) { return 1; }; // error, rest params have type mismatch diff --git a/tests/baselines/reference/asyncArrowFunction11_es5.js b/tests/baselines/reference/asyncArrowFunction11_es5.js index a16ce36e84072..f2ced4d437898 100644 --- a/tests/baselines/reference/asyncArrowFunction11_es5.js +++ b/tests/baselines/reference/asyncArrowFunction11_es5.js @@ -48,26 +48,20 @@ var __generator = (this && this.__generator) || function (thisArg, body) { var A = /** @class */ (function () { function A() { var _this = this; - this.b = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return __awaiter(_this, void 0, void 0, function () { - var obj; - var _a; - var _this = this; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: return [4 /*yield*/, Promise.resolve()]; - case 1: - _b.sent(); - obj = (_a = {}, _a["a"] = function () { return _this; }, _a); - return [2 /*return*/]; - } - }); + this.b = function () { return __awaiter(_this, void 0, void 0, function () { + var obj; + var _a; + var _this = this; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: return [4 /*yield*/, Promise.resolve()]; + case 1: + _b.sent(); + obj = (_a = {}, _a["a"] = function () { return _this; }, _a); + return [2 /*return*/]; + } }); - }; + }); }; } return A; }()); diff --git a/tests/baselines/reference/baseTypeAfterDerivedType.js b/tests/baselines/reference/baseTypeAfterDerivedType.js index c7cd84283c32e..1f1350fa54c0b 100644 --- a/tests/baselines/reference/baseTypeAfterDerivedType.js +++ b/tests/baselines/reference/baseTypeAfterDerivedType.js @@ -20,11 +20,6 @@ interface Base2 { var Derived2 = /** @class */ (function () { function Derived2() { } - Derived2.prototype.method = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - }; + Derived2.prototype.method = function () { }; return Derived2; }()); diff --git a/tests/baselines/reference/callWithSpread.js b/tests/baselines/reference/callWithSpread.js index ee0ab6fe8a716..672f3e82d7f56 100644 --- a/tests/baselines/reference/callWithSpread.js +++ b/tests/baselines/reference/callWithSpread.js @@ -81,10 +81,6 @@ var __spreadArrays = (this && this.__spreadArrays) || function () { }; var _a, _b, _c, _d, _e, _f, _g; function foo(x, y) { - var z = []; - for (var _i = 2; _i < arguments.length; _i++) { - z[_i - 2] = arguments[_i]; - } } var a; var z; @@ -119,10 +115,6 @@ var C = /** @class */ (function () { this.foo.apply(this, __spreadArrays([x, y], z)); } C.prototype.foo = function (x, y) { - var z = []; - for (var _i = 2; _i < arguments.length; _i++) { - z[_i - 2] = arguments[_i]; - } }; return C; }()); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js index c6372d5a4362b..bacb9ef55e108 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js @@ -23,10 +23,6 @@ var __extends = (this && this.__extends) || (function () { })(); var Based = /** @class */ (function () { function Based() { - var arg = []; - for (var _i = 0; _i < arguments.length; _i++) { - arg[_i] = arguments[_i]; - } } return Based; }()); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js index 5e0e9000e7d78..83fc50ea4df75 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js @@ -26,10 +26,6 @@ var __extends = (this && this.__extends) || (function () { })(); var Base = /** @class */ (function () { function Base() { - var arg = []; - for (var _i = 0; _i < arguments.length; _i++) { - arg[_i] = arguments[_i]; - } } return Base; }()); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js index 74bd178a88895..c6fb837820a1e 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js @@ -26,10 +26,6 @@ var __extends = (this && this.__extends) || (function () { })(); var Base = /** @class */ (function () { function Base() { - var arg = []; - for (var _i = 0; _i < arguments.length; _i++) { - arg[_i] = arguments[_i]; - } } return Base; }()); diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions.js b/tests/baselines/reference/collisionArgumentsArrowFunctions.js index 3e56b8b2f9cc3..09b189eca73af 100644 --- a/tests/baselines/reference/collisionArgumentsArrowFunctions.js +++ b/tests/baselines/reference/collisionArgumentsArrowFunctions.js @@ -18,27 +18,15 @@ var f2NoError = () => { //// [collisionArgumentsArrowFunctions.js] var f1 = function (i) { - var arguments = []; - for (var _i = 1; _i < arguments.length; _i++) { - arguments[_i - 1] = arguments[_i]; - } var arguments; // no error }; var f12 = function (arguments) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } var arguments = 10; // no error }; var f1NoError = function (arguments) { var arguments = 10; // no error }; var f2 = function () { - var restParameters = []; - for (var _i = 0; _i < arguments.length; _i++) { - restParameters[_i] = arguments[_i]; - } var arguments = 10; // No Error }; var f2NoError = function () { diff --git a/tests/baselines/reference/collisionArgumentsClassConstructor.js b/tests/baselines/reference/collisionArgumentsClassConstructor.js index b9da6ba4fa4b7..6546a54a9a5e4 100644 --- a/tests/baselines/reference/collisionArgumentsClassConstructor.js +++ b/tests/baselines/reference/collisionArgumentsClassConstructor.js @@ -90,20 +90,12 @@ declare class c6NoError { // Constructors var c1 = /** @class */ (function () { function c1(i) { - var arguments = []; - for (var _i = 1; _i < arguments.length; _i++) { - arguments[_i - 1] = arguments[_i]; - } var arguments; // no error } return c1; }()); var c12 = /** @class */ (function () { function c12(arguments) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } var arguments = 10; // no error } return c12; @@ -116,10 +108,6 @@ var c1NoError = /** @class */ (function () { }()); var c2 = /** @class */ (function () { function c2() { - var restParameters = []; - for (var _i = 0; _i < arguments.length; _i++) { - restParameters[_i] = arguments[_i]; - } var arguments = 10; // no error } return c2; @@ -132,10 +120,6 @@ var c2NoError = /** @class */ (function () { }()); var c3 = /** @class */ (function () { function c3(arguments) { - var restParameters = []; - for (var _i = 1; _i < arguments.length; _i++) { - restParameters[_i - 1] = arguments[_i]; - } this.arguments = arguments; var arguments = 10; // no error } @@ -150,20 +134,12 @@ var c3NoError = /** @class */ (function () { }()); var c5 = /** @class */ (function () { function c5(i) { - var arguments = []; - for (var _i = 1; _i < arguments.length; _i++) { - arguments[_i - 1] = arguments[_i]; - } var arguments; // no error } return c5; }()); var c52 = /** @class */ (function () { function c52(arguments) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } var arguments; // no error } return c52; diff --git a/tests/baselines/reference/collisionArgumentsClassMethod.js b/tests/baselines/reference/collisionArgumentsClassMethod.js index 3c2276f8ce517..deb1caaa75066 100644 --- a/tests/baselines/reference/collisionArgumentsClassMethod.js +++ b/tests/baselines/reference/collisionArgumentsClassMethod.js @@ -53,34 +53,18 @@ var c1 = /** @class */ (function () { function c1() { } c1.prototype.foo = function (i) { - var arguments = []; - for (var _i = 1; _i < arguments.length; _i++) { - arguments[_i - 1] = arguments[_i]; - } var arguments; // no error }; c1.prototype.foo1 = function (arguments) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } var arguments = 10; // no error }; c1.prototype.fooNoError = function (arguments) { var arguments = 10; // no error }; c1.prototype.f4 = function (i) { - var arguments = []; - for (var _i = 1; _i < arguments.length; _i++) { - arguments[_i - 1] = arguments[_i]; - } var arguments; // no error }; c1.prototype.f41 = function (arguments) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } var arguments; // no error }; c1.prototype.f4NoError = function (arguments) { @@ -92,10 +76,6 @@ var c3 = /** @class */ (function () { function c3() { } c3.prototype.foo = function () { - var restParameters = []; - for (var _i = 0; _i < arguments.length; _i++) { - restParameters[_i] = arguments[_i]; - } var arguments = 10; // no error }; c3.prototype.fooNoError = function () { diff --git a/tests/baselines/reference/collisionArgumentsFunction.js b/tests/baselines/reference/collisionArgumentsFunction.js index c6a26baa495f9..a5071d3078897 100644 --- a/tests/baselines/reference/collisionArgumentsFunction.js +++ b/tests/baselines/reference/collisionArgumentsFunction.js @@ -47,44 +47,24 @@ declare function f6(arguments: string); // no codegen no error //// [collisionArgumentsFunction.js] // Functions function f1(arguments) { - var restParameters = []; - for (var _i = 1; _i < arguments.length; _i++) { - restParameters[_i - 1] = arguments[_i]; - } var arguments = 10; // no error } function f12(i) { - var arguments = []; - for (var _i = 1; _i < arguments.length; _i++) { - arguments[_i - 1] = arguments[_i]; - } var arguments; // no error } function f1NoError(arguments) { var arguments = 10; // no error } function f3() { - var restParameters = []; - for (var _i = 0; _i < arguments.length; _i++) { - restParameters[_i] = arguments[_i]; - } var arguments = 10; // no error } function f3NoError() { var arguments = 10; // no error } function f4(arguments) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } var arguments; // No error } function f42(i) { - var arguments = []; - for (var _i = 1; _i < arguments.length; _i++) { - arguments[_i - 1] = arguments[_i]; - } var arguments; // No error } function f4NoError(arguments) { diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions.js b/tests/baselines/reference/collisionArgumentsFunctionExpressions.js index b3389ddbf4a54..a2cf58bee56a4 100644 --- a/tests/baselines/reference/collisionArgumentsFunctionExpressions.js +++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions.js @@ -37,44 +37,24 @@ function foo() { //// [collisionArgumentsFunctionExpressions.js] function foo() { function f1(arguments) { - var restParameters = []; - for (var _i = 1; _i < arguments.length; _i++) { - restParameters[_i - 1] = arguments[_i]; - } var arguments = 10; // no error } function f12(i) { - var arguments = []; - for (var _i = 1; _i < arguments.length; _i++) { - arguments[_i - 1] = arguments[_i]; - } var arguments; // no error } function f1NoError(arguments) { var arguments = 10; // no error } function f3() { - var restParameters = []; - for (var _i = 0; _i < arguments.length; _i++) { - restParameters[_i] = arguments[_i]; - } var arguments = 10; // no error } function f3NoError() { var arguments = 10; // no error } function f4(arguments) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } var arguments; // No error } function f42(i) { - var arguments = []; - for (var _i = 1; _i < arguments.length; _i++) { - arguments[_i - 1] = arguments[_i]; - } var arguments; // No error } function f4NoError(arguments) { diff --git a/tests/baselines/reference/collisionRestParameterArrowFunctions.js b/tests/baselines/reference/collisionRestParameterArrowFunctions.js index 3e20f48a4d056..785d8d49bd866 100644 --- a/tests/baselines/reference/collisionRestParameterArrowFunctions.js +++ b/tests/baselines/reference/collisionRestParameterArrowFunctions.js @@ -15,20 +15,12 @@ var f2NoError = () => { //// [collisionRestParameterArrowFunctions.js] var f1 = function (_i) { - var restParameters = []; - for (var _a = 1; _a < arguments.length; _a++) { - restParameters[_a - 1] = arguments[_a]; - } var _i = 10; // no error }; var f1NoError = function (_i) { var _i = 10; // no error }; var f2 = function () { - var restParameters = []; - for (var _a = 0; _a < arguments.length; _a++) { - restParameters[_a] = arguments[_a]; - } var _i = 10; // No Error }; var f2NoError = function () { diff --git a/tests/baselines/reference/collisionRestParameterClassConstructor.js b/tests/baselines/reference/collisionRestParameterClassConstructor.js index ee6565cf0a1e6..399eec2c3ef38 100644 --- a/tests/baselines/reference/collisionRestParameterClassConstructor.js +++ b/tests/baselines/reference/collisionRestParameterClassConstructor.js @@ -70,10 +70,6 @@ declare class c6NoError { // Constructors var c1 = /** @class */ (function () { function c1(_i) { - var restParameters = []; - for (var _a = 1; _a < arguments.length; _a++) { - restParameters[_a - 1] = arguments[_a]; - } var _i = 10; // no error } return c1; @@ -86,10 +82,6 @@ var c1NoError = /** @class */ (function () { }()); var c2 = /** @class */ (function () { function c2() { - var restParameters = []; - for (var _a = 0; _a < arguments.length; _a++) { - restParameters[_a] = arguments[_a]; - } var _i = 10; // no error } return c2; @@ -102,10 +94,6 @@ var c2NoError = /** @class */ (function () { }()); var c3 = /** @class */ (function () { function c3(_i) { - var restParameters = []; - for (var _a = 1; _a < arguments.length; _a++) { - restParameters[_a - 1] = arguments[_a]; - } this._i = _i; var _i = 10; // no error } @@ -120,10 +108,6 @@ var c3NoError = /** @class */ (function () { }()); var c5 = /** @class */ (function () { function c5(_i) { - var rest = []; - for (var _a = 1; _a < arguments.length; _a++) { - rest[_a - 1] = arguments[_a]; - } var _i; // no error } return c5; diff --git a/tests/baselines/reference/collisionRestParameterClassMethod.js b/tests/baselines/reference/collisionRestParameterClassMethod.js index 6c49ebe135053..a6543051acba2 100644 --- a/tests/baselines/reference/collisionRestParameterClassMethod.js +++ b/tests/baselines/reference/collisionRestParameterClassMethod.js @@ -43,20 +43,12 @@ var c1 = /** @class */ (function () { function c1() { } c1.prototype.foo = function (_i) { - var restParameters = []; - for (var _a = 1; _a < arguments.length; _a++) { - restParameters[_a - 1] = arguments[_a]; - } var _i = 10; // no error }; c1.prototype.fooNoError = function (_i) { var _i = 10; // no error }; c1.prototype.f4 = function (_i) { - var rest = []; - for (var _a = 1; _a < arguments.length; _a++) { - rest[_a - 1] = arguments[_a]; - } var _i; // no error }; c1.prototype.f4NoError = function (_i) { @@ -68,10 +60,6 @@ var c3 = /** @class */ (function () { function c3() { } c3.prototype.foo = function () { - var restParameters = []; - for (var _a = 0; _a < arguments.length; _a++) { - restParameters[_a] = arguments[_a]; - } var _i = 10; // no error }; c3.prototype.fooNoError = function () { diff --git a/tests/baselines/reference/collisionRestParameterFunction.js b/tests/baselines/reference/collisionRestParameterFunction.js index 651062a696c3b..a1f47aafdca87 100644 --- a/tests/baselines/reference/collisionRestParameterFunction.js +++ b/tests/baselines/reference/collisionRestParameterFunction.js @@ -36,30 +36,18 @@ declare function f6(_i: string); // no codegen no error //// [collisionRestParameterFunction.js] // Functions function f1(_i) { - var restParameters = []; - for (var _a = 1; _a < arguments.length; _a++) { - restParameters[_a - 1] = arguments[_a]; - } var _i = 10; // no error } function f1NoError(_i) { var _i = 10; // no error } function f3() { - var restParameters = []; - for (var _a = 0; _a < arguments.length; _a++) { - restParameters[_a] = arguments[_a]; - } var _i = 10; // no error } function f3NoError() { var _i = 10; // no error } function f4(_i) { - var rest = []; - for (var _a = 1; _a < arguments.length; _a++) { - rest[_a - 1] = arguments[_a]; - } } function f4NoError(_i) { } diff --git a/tests/baselines/reference/collisionRestParameterFunctionExpressions.js b/tests/baselines/reference/collisionRestParameterFunctionExpressions.js index 87bafea09bd2f..dd2f5ff08d3f4 100644 --- a/tests/baselines/reference/collisionRestParameterFunctionExpressions.js +++ b/tests/baselines/reference/collisionRestParameterFunctionExpressions.js @@ -27,30 +27,18 @@ function foo() { //// [collisionRestParameterFunctionExpressions.js] function foo() { function f1(_i) { - var restParameters = []; - for (var _a = 1; _a < arguments.length; _a++) { - restParameters[_a - 1] = arguments[_a]; - } var _i = 10; // no error } function f1NoError(_i) { var _i = 10; // no error } function f3() { - var restParameters = []; - for (var _a = 0; _a < arguments.length; _a++) { - restParameters[_a] = arguments[_a]; - } var _i = 10; // no error } function f3NoError() { var _i = 10; // no error } function f4(_i) { - var rest = []; - for (var _a = 1; _a < arguments.length; _a++) { - rest[_a - 1] = arguments[_a]; - } } function f4NoError(_i) { } diff --git a/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.js b/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.js index 4b09dfe6683d8..c50295a900ee5 100644 --- a/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.js +++ b/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.js @@ -12,10 +12,6 @@ new Foo(); var _i = "This is what I'd expect to see"; var Foo = /** @class */ (function () { function Foo() { - var args = []; - for (var _a = 0; _a < arguments.length; _a++) { - args[_a] = arguments[_a]; - } console.log(_i); // This should result in error } return Foo; diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js index 3872e27c5f3c9..b7a4facb977b6 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js @@ -302,10 +302,6 @@ var TypeScriptAllInOne; this["case"] = bfs.STATEMENTS(4); } Program.Main = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } try { var bfs = new BasicFeatures(); var retValue = 0; diff --git a/tests/baselines/reference/contextuallyTypedParametersWithInitializers.js b/tests/baselines/reference/contextuallyTypedParametersWithInitializers.js index 0d82ea761b752..2fbbbd22b9ea4 100644 --- a/tests/baselines/reference/contextuallyTypedParametersWithInitializers.js +++ b/tests/baselines/reference/contextuallyTypedParametersWithInitializers.js @@ -149,13 +149,7 @@ var f6 = function (x) { return 0; }; // number var f7 = function (x) { return 0; }; // Implicit any error -var f8 = function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - return 0; -}; // [] +var f8 = function () { return 0; }; // [] g1(function (x) { if (x === void 0) { x = 1; } return 0; @@ -181,13 +175,7 @@ g6(function (x) { return 0; }); // number g6(function (x) { return 0; }); // Implicit any error -g6(function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - return 0; -}); // [] +g6(function () { return 0; }); // [] // Repro from #28816 function id(input) { return input; } function getFoo(_a) { diff --git a/tests/baselines/reference/declFileFunctions.js b/tests/baselines/reference/declFileFunctions.js index 4924f15b080ae..db0e3a72da838 100644 --- a/tests/baselines/reference/declFileFunctions.js +++ b/tests/baselines/reference/declFileFunctions.js @@ -120,10 +120,6 @@ function fooWithTypeTypePredicateAndGeneric(a) { } exports.fooWithTypeTypePredicateAndGeneric = fooWithTypeTypePredicateAndGeneric; function fooWithTypeTypePredicateAndRestParam(a) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } return true; } exports.fooWithTypeTypePredicateAndRestParam = fooWithTypeTypePredicateAndRestParam; diff --git a/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.js b/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.js index 71d7bfc0fb259..e0655202fef1d 100644 --- a/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.js +++ b/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.js @@ -10,12 +10,7 @@ var f6 = () => { return [10]; } //// [declFileRestParametersOfFunctionAndFunctionType.js] -function f1() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } -} +function f1() { } function f2(x) { } function f3(x) { } function f4() { } diff --git a/tests/baselines/reference/declarationEmitDestructuringOptionalBindingParametersInOverloads.js b/tests/baselines/reference/declarationEmitDestructuringOptionalBindingParametersInOverloads.js index 35c5439273f14..27b47cd2386b4 100644 --- a/tests/baselines/reference/declarationEmitDestructuringOptionalBindingParametersInOverloads.js +++ b/tests/baselines/reference/declarationEmitDestructuringOptionalBindingParametersInOverloads.js @@ -10,16 +10,8 @@ function foo2(...rest: any[]) { //// [declarationEmitDestructuringOptionalBindingParametersInOverloads.js] function foo() { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i] = arguments[_i]; - } } function foo2() { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i] = arguments[_i]; - } } diff --git a/tests/baselines/reference/declarationEmitIndexTypeArray.js b/tests/baselines/reference/declarationEmitIndexTypeArray.js index 9fe8878a8db31..9a824745aca42 100644 --- a/tests/baselines/reference/declarationEmitIndexTypeArray.js +++ b/tests/baselines/reference/declarationEmitIndexTypeArray.js @@ -7,12 +7,7 @@ const utilityFunctions = { //// [declarationEmitIndexTypeArray.js] -function doSomethingWithKeys() { - var keys = []; - for (var _i = 0; _i < arguments.length; _i++) { - keys[_i] = arguments[_i]; - } -} +function doSomethingWithKeys() { } var utilityFunctions = { doSomethingWithKeys: doSomethingWithKeys }; diff --git a/tests/baselines/reference/decoratorMetadataRestParameterWithImportedType.js b/tests/baselines/reference/decoratorMetadataRestParameterWithImportedType.js index c42cb65faa1de..f4f5d6f617238 100644 --- a/tests/baselines/reference/decoratorMetadataRestParameterWithImportedType.js +++ b/tests/baselines/reference/decoratorMetadataRestParameterWithImportedType.js @@ -99,10 +99,6 @@ var ClassA = /** @class */ (function () { this.array = init; } ClassA.prototype.foo = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } }; __decorate([ annotation1(), diff --git a/tests/baselines/reference/decoratorReferenceOnOtherProperty.js b/tests/baselines/reference/decoratorReferenceOnOtherProperty.js index 72f63d2d720ef..73d6e0e16e2f9 100644 --- a/tests/baselines/reference/decoratorReferenceOnOtherProperty.js +++ b/tests/baselines/reference/decoratorReferenceOnOtherProperty.js @@ -51,12 +51,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) { }; exports.__esModule = true; var yoha_1 = require("./yoha"); -function foo() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } -} +function foo() { } var Bar = /** @class */ (function () { function Bar() { } @@ -85,21 +80,11 @@ var __param = (this && this.__param) || function (paramIndex, decorator) { }; exports.__esModule = true; var yoha_1 = require("./yoha"); -function foo() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } -} +function foo() { } var Bar = /** @class */ (function () { function Bar() { } - Bar.prototype.yoha = function (yoha) { - var bar = []; - for (var _i = 1; _i < arguments.length; _i++) { - bar[_i - 1] = arguments[_i]; - } - }; + Bar.prototype.yoha = function (yoha) { }; __decorate([ __param(0, foo), __metadata("design:type", Function), diff --git a/tests/baselines/reference/defaultExportWithOverloads01.js b/tests/baselines/reference/defaultExportWithOverloads01.js index 1b4030387509c..73558dd6adc36 100644 --- a/tests/baselines/reference/defaultExportWithOverloads01.js +++ b/tests/baselines/reference/defaultExportWithOverloads01.js @@ -8,9 +8,5 @@ export default function f(...args: any[]) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function f() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } } exports.default = f; diff --git a/tests/baselines/reference/destructuringParameterDeclaration3ES5iterable.js b/tests/baselines/reference/destructuringParameterDeclaration3ES5iterable.js index 087bf87aaea25..2a6d6a65a02b2 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration3ES5iterable.js +++ b/tests/baselines/reference/destructuringParameterDeclaration3ES5iterable.js @@ -68,36 +68,11 @@ var __spread = (this && this.__spread) || function () { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; }; -function a1() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -} -function a2() { - var a = []; - for (var _i = 0; _i < arguments.length; _i++) { - a[_i] = arguments[_i]; - } -} -function a3() { - var a = []; - for (var _i = 0; _i < arguments.length; _i++) { - a[_i] = arguments[_i]; - } -} -function a4() { - var a = []; - for (var _i = 0; _i < arguments.length; _i++) { - a[_i] = arguments[_i]; - } -} -function a5() { - var a = []; - for (var _i = 0; _i < arguments.length; _i++) { - a[_i] = arguments[_i]; - } -} +function a1() { } +function a2() { } +function a3() { } +function a4() { } +function a5() { } function a9(_a) { var _b = __read(_a, 3), a = _b[0], b = _b[1], _c = __read(_b[2], 1), _d = __read(_c[0], 1), c = _d[0]; } @@ -117,12 +92,7 @@ a10([1, 2, 3, false, true]); // Parameter type is any[] a10([1, 2]); // Parameter type is any[] a11([1, 2]); // Parameter type is number[] // Rest parameter with generic -function foo() { - var a = []; - for (var _i = 0; _i < arguments.length; _i++) { - a[_i] = arguments[_i]; - } -} +function foo() { } foo("hello", 1, 2); foo("hello", "world"); var E; @@ -130,11 +100,6 @@ var E; E[E["a"] = 0] = "a"; E[E["b"] = 1] = "b"; })(E || (E = {})); -function foo1() { - var a = []; - for (var _i = 0; _i < arguments.length; _i++) { - a[_i] = arguments[_i]; - } -} +function foo1() { } foo1(1, 2, 3, E.a); foo1(1, 2, 3, 0 /* a */, E.b); diff --git a/tests/baselines/reference/destructuringParameterDeclaration4.js b/tests/baselines/reference/destructuringParameterDeclaration4.js index 724c7330b27c3..8f4ea1f2ced78 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration4.js +++ b/tests/baselines/reference/destructuringParameterDeclaration4.js @@ -40,36 +40,11 @@ foo1(1, 2, "string", E1.a, E.b); // Error //// [destructuringParameterDeclaration4.js] // If the parameter is a rest parameter, the parameter type is any[] // A type annotation for a rest parameter must denote an array type. -function a0() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -} // Error, rest parameter must be array type -function a1() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -} -function a2() { - var a = []; - for (var _i = 0; _i < arguments.length; _i++) { - a[_i] = arguments[_i]; - } -} // Error, rest parameter must be array type -function a3() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} // Error, can't be optional -function a4() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} // Error, can't have initializer +function a0() { } // Error, rest parameter must be array type +function a1() { } +function a2() { } // Error, rest parameter must be array type +function a3() { } // Error, can't be optional +function a4() { } // Error, can't have initializer function a5(_a) { var a = _a[0], b = _a[1], c = _a[2][0][0]; } @@ -84,19 +59,10 @@ a6([1, 2, "string"]); // Error, parameter type is number[] var temp = [1, 2, 3]; var C = /** @class */ (function () { function C() { - var temp = []; - for (var _i = 0; _i < arguments.length; _i++) { - temp[_i] = arguments[_i]; - } this.temp = temp; } // Error, rest parameter can't have properties return C; }()); // Rest parameter with generic -function foo1() { - var a = []; - for (var _i = 0; _i < arguments.length; _i++) { - a[_i] = arguments[_i]; - } -} +function foo1() { } foo1(1, 2, "string", E1.a, E.b); // Error diff --git a/tests/baselines/reference/destructuringParameterDeclaration6.js b/tests/baselines/reference/destructuringParameterDeclaration6.js index a8c7f65211f75..69ba2ff9f8e7c 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration6.js +++ b/tests/baselines/reference/destructuringParameterDeclaration6.js @@ -37,25 +37,10 @@ while (, ) for (, public; ; ) ; { } -function a5() { - var = []; - for (var _i = 0; _i < arguments.length; _i++) { - [_i] = arguments[_i]; - } -} +function a5() { } while () { } -function a6() { - var public = []; - for (var _i = 0; _i < arguments.length; _i++) { - public[_i] = arguments[_i]; - } -} -function a7() { - var a = []; - for (var _i = 0; _i < arguments.length; _i++) { - a[_i] = arguments[_i]; - } -} +function a6() { } +function a7() { } a({ "while": 1 }); // No Error function b1(_a) { diff --git a/tests/baselines/reference/detachedCommentAtStartOfLambdaFunction1.js b/tests/baselines/reference/detachedCommentAtStartOfLambdaFunction1.js index 9d5f809eceb3c..1ab0b5d4a198d 100644 --- a/tests/baselines/reference/detachedCommentAtStartOfLambdaFunction1.js +++ b/tests/baselines/reference/detachedCommentAtStartOfLambdaFunction1.js @@ -17,10 +17,6 @@ var TestFile = /** @class */ (function () { TestFile.prototype.foo = function (message) { var _this = this; return function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } /// Test summary /// /// diff --git a/tests/baselines/reference/detachedCommentAtStartOfLambdaFunction2.js b/tests/baselines/reference/detachedCommentAtStartOfLambdaFunction2.js index 150341d2f6509..5a833ad1c2a5c 100644 --- a/tests/baselines/reference/detachedCommentAtStartOfLambdaFunction2.js +++ b/tests/baselines/reference/detachedCommentAtStartOfLambdaFunction2.js @@ -21,10 +21,6 @@ var TestFile = /** @class */ (function () { /// Test summary /// /// - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } return message + _this.name; }; }; diff --git a/tests/baselines/reference/disallowLineTerminatorBeforeArrow.js b/tests/baselines/reference/disallowLineTerminatorBeforeArrow.js index 751d93ddc63bd..408cd6e68a4a2 100644 --- a/tests/baselines/reference/disallowLineTerminatorBeforeArrow.js +++ b/tests/baselines/reference/disallowLineTerminatorBeforeArrow.js @@ -77,30 +77,10 @@ module m { //// [disallowLineTerminatorBeforeArrow.js] var f1 = function () { }; var f2 = function (x, y) { }; -var f3 = function (x, y) { - var rest = []; - for (var _i = 2; _i < arguments.length; _i++) { - rest[_i - 2] = arguments[_i]; - } -}; -var f4 = function (x, y) { - var rest = []; - for (var _i = 2; _i < arguments.length; _i++) { - rest[_i - 2] = arguments[_i]; - } -}; -var f5 = function () { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i] = arguments[_i]; - } -}; -var f6 = function () { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i] = arguments[_i]; - } -}; +var f3 = function (x, y) { }; +var f4 = function (x, y) { }; +var f5 = function () { }; +var f6 = function () { }; var f7 = function (x, y, z) { if (z === void 0) { z = 10; } }; diff --git a/tests/baselines/reference/duplicateIdentifierBindingElementInParameterDeclaration1.js b/tests/baselines/reference/duplicateIdentifierBindingElementInParameterDeclaration1.js index 639f4df7880b2..e2602c49e0b44 100644 --- a/tests/baselines/reference/duplicateIdentifierBindingElementInParameterDeclaration1.js +++ b/tests/baselines/reference/duplicateIdentifierBindingElementInParameterDeclaration1.js @@ -30,10 +30,6 @@ function f5(_a, _b, _c) { var e = _a.e, e = _a.e.e; var e = _b.e; var d = _c[0], e = _c[1], e = _c[2][0][0]; - var e = []; - for (var _i = 3; _i < arguments.length; _i++) { - e[_i - 3] = arguments[_i]; - } } function f6(_a) { var f = _a[0], f = _a.slice(1); diff --git a/tests/baselines/reference/duplicateIdentifierBindingElementInParameterDeclaration2.js b/tests/baselines/reference/duplicateIdentifierBindingElementInParameterDeclaration2.js index caaf482d26933..fc14444c9e560 100644 --- a/tests/baselines/reference/duplicateIdentifierBindingElementInParameterDeclaration2.js +++ b/tests/baselines/reference/duplicateIdentifierBindingElementInParameterDeclaration2.js @@ -32,10 +32,6 @@ function f5(_a, _b, _c) { var e = _a.e, e = _a.e.e; var e = _b.e; var d = _c[0], e = _c[1], e = _c[2][0][0]; - var e = []; - for (var _i = 3; _i < arguments.length; _i++) { - e[_i - 3] = arguments[_i]; - } } function f6(_a) { var f = _a[0], f = _a.slice(1); diff --git a/tests/baselines/reference/emitArrowFunction.js b/tests/baselines/reference/emitArrowFunction.js index 7e2617045a854..455972f781b56 100644 --- a/tests/baselines/reference/emitArrowFunction.js +++ b/tests/baselines/reference/emitArrowFunction.js @@ -10,12 +10,7 @@ foo(() => { return false; }); //// [emitArrowFunction.js] var f1 = function () { }; var f2 = function (x, y) { }; -var f3 = function (x, y) { - var rest = []; - for (var _i = 2; _i < arguments.length; _i++) { - rest[_i - 2] = arguments[_i]; - } -}; +var f3 = function (x, y) { }; var f4 = function (x, y, z) { if (z === void 0) { z = 10; } }; diff --git a/tests/baselines/reference/emitDecoratorMetadata_restArgs.js b/tests/baselines/reference/emitDecoratorMetadata_restArgs.js index c05caf64dd3eb..79f949ae6b849 100644 --- a/tests/baselines/reference/emitDecoratorMetadata_restArgs.js +++ b/tests/baselines/reference/emitDecoratorMetadata_restArgs.js @@ -29,17 +29,8 @@ var __metadata = (this && this.__metadata) || function (k, v) { }; var A = /** @class */ (function () { function A() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } } - A.prototype.method = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - }; + A.prototype.method = function () { }; __decorate([ MyMethodDecorator, __metadata("design:type", Function), @@ -54,17 +45,8 @@ var A = /** @class */ (function () { }()); var B = /** @class */ (function () { function B() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } } - B.prototype.method = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - }; + B.prototype.method = function () { }; __decorate([ MyMethodDecorator, __metadata("design:type", Function), diff --git a/tests/baselines/reference/emitDefaultParametersFunction.js b/tests/baselines/reference/emitDefaultParametersFunction.js index 6be7ae9dbfec4..e25fd53bfb826 100644 --- a/tests/baselines/reference/emitDefaultParametersFunction.js +++ b/tests/baselines/reference/emitDefaultParametersFunction.js @@ -10,18 +10,10 @@ function foo(x, y) { } function baz(x, y) { if (y === void 0) { y = 5; } - var rest = []; - for (var _i = 2; _i < arguments.length; _i++) { - rest[_i - 2] = arguments[_i]; - } } function bar(y) { if (y === void 0) { y = 10; } } function bar1(y) { if (y === void 0) { y = 10; } - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } } diff --git a/tests/baselines/reference/emitDefaultParametersFunctionExpression.js b/tests/baselines/reference/emitDefaultParametersFunctionExpression.js index bcfe5b240f2a3..80f791aa9c05f 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionExpression.js +++ b/tests/baselines/reference/emitDefaultParametersFunctionExpression.js @@ -18,37 +18,17 @@ var lambda2 = function (x, y) { }; var lambda3 = function (x, y) { if (y === void 0) { y = "hello"; } - var rest = []; - for (var _i = 2; _i < arguments.length; _i++) { - rest[_i - 2] = arguments[_i]; - } }; var lambda4 = function (y) { if (y === void 0) { y = "hello"; } - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } }; var x = function (str) { if (str === void 0) { str = "hello"; } - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } }; var y = (function (num, boo) { if (num === void 0) { num = 10; } if (boo === void 0) { boo = false; } - var rest = []; - for (var _i = 2; _i < arguments.length; _i++) { - rest[_i - 2] = arguments[_i]; - } })(); var z = (function (num, boo) { if (boo === void 0) { boo = false; } - var rest = []; - for (var _i = 2; _i < arguments.length; _i++) { - rest[_i - 2] = arguments[_i]; - } })(10); diff --git a/tests/baselines/reference/emitDefaultParametersFunctionProperty.js b/tests/baselines/reference/emitDefaultParametersFunctionProperty.js index 16cac41a4cef9..0cb34c4c9b870 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionProperty.js +++ b/tests/baselines/reference/emitDefaultParametersFunctionProperty.js @@ -11,10 +11,6 @@ var obj2 = { var obj2 = { func1: function (y) { if (y === void 0) { y = 10; } - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } }, func2: function (x) { if (x === void 0) { x = "hello"; } @@ -24,9 +20,5 @@ var obj2 = { }, func4: function (x, z, y) { if (y === void 0) { y = "hello"; } - var rest = []; - for (var _i = 3; _i < arguments.length; _i++) { - rest[_i - 3] = arguments[_i]; - } }, }; diff --git a/tests/baselines/reference/emitDefaultParametersMethod.js b/tests/baselines/reference/emitDefaultParametersMethod.js index 0f935fae0aaeb..cd3068066c27c 100644 --- a/tests/baselines/reference/emitDefaultParametersMethod.js +++ b/tests/baselines/reference/emitDefaultParametersMethod.js @@ -27,20 +27,12 @@ var C = /** @class */ (function () { }; C.prototype.foo1 = function (x, t) { if (t === void 0) { t = false; } - var rest = []; - for (var _i = 2; _i < arguments.length; _i++) { - rest[_i - 2] = arguments[_i]; - } }; C.prototype.bar = function (t) { if (t === void 0) { t = false; } }; C.prototype.boo = function (t) { if (t === void 0) { t = false; } - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } }; return C; }()); @@ -53,10 +45,6 @@ var D = /** @class */ (function () { var E = /** @class */ (function () { function E(y) { if (y === void 0) { y = "hello"; } - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } } return E; }()); diff --git a/tests/baselines/reference/emitRestParametersFunction.js b/tests/baselines/reference/emitRestParametersFunction.js index dff77ad4b5559..4ee4ff06df968 100644 --- a/tests/baselines/reference/emitRestParametersFunction.js +++ b/tests/baselines/reference/emitRestParametersFunction.js @@ -3,15 +3,5 @@ function bar(...rest) { } function foo(x: number, y: string, ...rest) { } //// [emitRestParametersFunction.js] -function bar() { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i] = arguments[_i]; - } -} -function foo(x, y) { - var rest = []; - for (var _i = 2; _i < arguments.length; _i++) { - rest[_i - 2] = arguments[_i]; - } -} +function bar() { } +function foo(x, y) { } diff --git a/tests/baselines/reference/emitRestParametersFunctionExpression.js b/tests/baselines/reference/emitRestParametersFunctionExpression.js index 55d4b505808f6..6229c1e8d6412 100644 --- a/tests/baselines/reference/emitRestParametersFunctionExpression.js +++ b/tests/baselines/reference/emitRestParametersFunctionExpression.js @@ -6,27 +6,7 @@ var funcExp3 = (function (...rest) { })() //// [emitRestParametersFunctionExpression.js] -var funcExp = function () { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i] = arguments[_i]; - } -}; -var funcExp1 = function (X) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } -}; -var funcExp2 = function () { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i] = arguments[_i]; - } -}; -var funcExp3 = (function () { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i] = arguments[_i]; - } -})(); +var funcExp = function () { }; +var funcExp1 = function (X) { }; +var funcExp2 = function () { }; +var funcExp3 = (function () { })(); diff --git a/tests/baselines/reference/emitRestParametersFunctionProperty.js b/tests/baselines/reference/emitRestParametersFunctionProperty.js index 99d004daeb2d0..eec67fb880a40 100644 --- a/tests/baselines/reference/emitRestParametersFunctionProperty.js +++ b/tests/baselines/reference/emitRestParametersFunctionProperty.js @@ -10,10 +10,5 @@ var obj2 = { //// [emitRestParametersFunctionProperty.js] var obj; var obj2 = { - func: function () { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i] = arguments[_i]; - } - } + func: function () { } }; diff --git a/tests/baselines/reference/emitRestParametersMethod.js b/tests/baselines/reference/emitRestParametersMethod.js index 370266a5f698d..6280956ea1396 100644 --- a/tests/baselines/reference/emitRestParametersMethod.js +++ b/tests/baselines/reference/emitRestParametersMethod.js @@ -16,43 +16,15 @@ class D { //// [emitRestParametersMethod.js] var C = /** @class */ (function () { function C(name) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } } - C.prototype.bar = function () { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i] = arguments[_i]; - } - }; - C.prototype.foo = function (x) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } - }; + C.prototype.bar = function () { }; + C.prototype.foo = function (x) { }; return C; }()); var D = /** @class */ (function () { function D() { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i] = arguments[_i]; - } } - D.prototype.bar = function () { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i] = arguments[_i]; - } - }; - D.prototype.foo = function (x) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } - }; + D.prototype.bar = function () { }; + D.prototype.foo = function (x) { }; return D; }()); diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js index 86edc5adcdbc0..a496ba7eaba2a 100644 --- a/tests/baselines/reference/es6ClassTest2.js +++ b/tests/baselines/reference/es6ClassTest2.js @@ -242,17 +242,8 @@ m5.health = 0; var y = m5.isAlive.toString(); var SplatMonster = /** @class */ (function () { function SplatMonster() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } } - SplatMonster.prototype.roar = function (name) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - }; + SplatMonster.prototype.roar = function (name) { }; return SplatMonster; }()); function foo() { return true; } diff --git a/tests/baselines/reference/es6modulekindWithES5Target6.js b/tests/baselines/reference/es6modulekindWithES5Target6.js index b57b38d17edc6..e7c4b7fb8df08 100644 --- a/tests/baselines/reference/es6modulekindWithES5Target6.js +++ b/tests/baselines/reference/es6modulekindWithES5Target6.js @@ -14,10 +14,6 @@ export function f1(d) { if (d === void 0) { d = 0; } } export function f2() { - var arg = []; - for (var _i = 0; _i < arguments.length; _i++) { - arg[_i] = arguments[_i]; - } } export default function f3(d) { if (d === void 0) { d = 0; } diff --git a/tests/baselines/reference/esnextmodulekindWithES5Target6.js b/tests/baselines/reference/esnextmodulekindWithES5Target6.js index 85a87acacef29..b5df8ec532b7e 100644 --- a/tests/baselines/reference/esnextmodulekindWithES5Target6.js +++ b/tests/baselines/reference/esnextmodulekindWithES5Target6.js @@ -14,10 +14,6 @@ export function f1(d) { if (d === void 0) { d = 0; } } export function f2() { - var arg = []; - for (var _i = 0; _i < arguments.length; _i++) { - arg[_i] = arguments[_i]; - } } export default function f3(d) { if (d === void 0) { d = 0; } diff --git a/tests/baselines/reference/fatarrowfunctionsErrors.js b/tests/baselines/reference/fatarrowfunctionsErrors.js index 0f318f1aa84ad..3205a8aa24fb8 100644 --- a/tests/baselines/reference/fatarrowfunctionsErrors.js +++ b/tests/baselines/reference/fatarrowfunctionsErrors.js @@ -13,13 +13,7 @@ var x3 = (a:number) {}; var x4= (...a: any[]) { }; //// [fatarrowfunctionsErrors.js] -foo(function () { - var Far = []; - for (var _i = 0; _i < arguments.length; _i++) { - Far[_i] = arguments[_i]; - } - return 0; -}); +foo(function () { return 0; }); foo((1), { "return": 0 }); foo(function (x) { return x; }); foo(function (x) { @@ -33,9 +27,4 @@ false ? (function () { return null; }) : null; var x1 = function () { }; var x2 = function (a) { }; var x3 = function (a) { }; -var x4 = function () { - var a = []; - for (var _i = 0; _i < arguments.length; _i++) { - a[_i] = arguments[_i]; - } -}; +var x4 = function () { }; diff --git a/tests/baselines/reference/fatarrowfunctionsOptionalArgs.js b/tests/baselines/reference/fatarrowfunctionsOptionalArgs.js index f7e49680f8a51..1028d1837ca3d 100644 --- a/tests/baselines/reference/fatarrowfunctionsOptionalArgs.js +++ b/tests/baselines/reference/fatarrowfunctionsOptionalArgs.js @@ -156,13 +156,7 @@ foo( // optional param (function (arg) { return 7; }); // var arg param -(function () { - var arg = []; - for (var _i = 0; _i < arguments.length; _i++) { - arg[_i] = arguments[_i]; - } - return 8; -}); +(function () { return 8; }); // multiple arguments (function (arg1, arg2) { return 12; }); (function (arg1, arg2) { @@ -178,13 +172,7 @@ foo( return 16; }); (function (arg1, arg2) { return 17; }); -(function (arg1) { - var arg2 = []; - for (var _i = 1; _i < arguments.length; _i++) { - arg2[_i - 1] = arguments[_i]; - } - return 18; -}); +(function (arg1) { return 18; }); (function (arg1, arg2) { return 19; }); // in paren (function () { return 21; }); @@ -200,13 +188,7 @@ foo( return 26; }); (function (arg) { return 27; }); -(function () { - var arg = []; - for (var _i = 0; _i < arguments.length; _i++) { - arg[_i] = arguments[_i]; - } - return 28; -}); +(function () { return 28; }); // in multiple paren ((((function (arg) { return 32; })))); // in ternary exression @@ -223,13 +205,7 @@ false ? function (arg) { if (arg === void 0) { arg = 0; } return 47; } : null; -false ? function () { - var arg = []; - for (var _i = 0; _i < arguments.length; _i++) { - arg[_i] = arguments[_i]; - } - return 48; -} : null; +false ? function () { return 48; } : null; // in ternary exression within paren false ? (function () { return 51; }) : null; false ? (function (arg) { return 52; }) : null; @@ -244,13 +220,7 @@ false ? (function (arg) { if (arg === void 0) { arg = 0; } return 57; }) : null; -false ? (function () { - var arg = []; - for (var _i = 0; _i < arguments.length; _i++) { - arg[_i] = arguments[_i]; - } - return 58; -}) : null; +false ? (function () { return 58; }) : null; // ternary exression's else clause false ? null : function () { return 61; }; false ? null : function (arg) { return 62; }; @@ -265,13 +235,7 @@ false ? null : function (arg) { if (arg === void 0) { arg = 0; } return 67; }; -false ? null : function () { - var arg = []; - for (var _i = 0; _i < arguments.length; _i++) { - arg[_i] = arguments[_i]; - } - return 68; -}; +false ? null : function () { return 68; }; // nested ternary expressions (function (a) { return a; }) ? function (b) { return b; } : function (c) { return c; }; //multiple levels @@ -291,13 +255,7 @@ false ? null : function () { return 94; }) instanceof Function; (function (arg) { return 95; }) instanceof Function; -(function () { - var arg = []; - for (var _i = 0; _i < arguments.length; _i++) { - arg[_i] = arguments[_i]; - } - return 96; -}) instanceof Function; +(function () { return 96; }) instanceof Function; '' + (function (arg) { return 100; }); (function (arg) { return 0; }) + '' + (function (arg) { return 101; }); (function (arg) { @@ -323,40 +281,11 @@ false ? null : function () { if (arg === void 0) { arg = 2; } return 106; }); -(function () { - var arg = []; - for (var _i = 0; _i < arguments.length; _i++) { - arg[_i] = arguments[_i]; - } - return 0; -}) + '' + (function () { - var arg = []; - for (var _i = 0; _i < arguments.length; _i++) { - arg[_i] = arguments[_i]; - } - return 107; -}); +(function () { return 0; }) + '' + (function () { return 107; }); (function (arg1, arg2) { return 0; }) + '' + (function (arg1, arg2) { return 108; }); -(function (arg1) { - var arg2 = []; - for (var _i = 1; _i < arguments.length; _i++) { - arg2[_i - 1] = arguments[_i]; - } - return 0; -}) + '' + (function (arg1) { - var arg2 = []; - for (var _i = 1; _i < arguments.length; _i++) { - arg2[_i - 1] = arguments[_i]; - } - return 108; -}); +(function (arg1) { return 0; }) + '' + (function (arg1) { return 108; }); // Function Parameters -function foo() { - var arg = []; - for (var _i = 0; _i < arguments.length; _i++) { - arg[_i] = arguments[_i]; - } -} +function foo() { } foo(function (a) { return 110; }, (function (a) { return 111; }), function (a) { return 112; }, function (a) { return 113; }, function (a, b) { return 114; }, function (a) { return 115; }, function (a) { @@ -368,17 +297,7 @@ foo(function (a) { return 110; }, (function (a) { return 111; }), function (a) { }, function (a) { if (a === void 0) { a = 0; } return 118; -}, function () { - var a = []; - for (var _i = 0; _i < arguments.length; _i++) { - a[_i] = arguments[_i]; - } - return 119; -}, function (a, b) { +}, function () { return 119; }, function (a, b) { if (b === void 0) { b = 0; } - var c = []; - for (var _i = 2; _i < arguments.length; _i++) { - c[_i - 2] = arguments[_i]; - } return 120; }, function (a) { return function (b) { return function (c) { return 121; }; }; }, false ? function (a) { return 0; } : function (b) { return 122; }); diff --git a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.js b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.js index edbc897922c1b..6b96a6306ac8e 100644 --- a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.js +++ b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.js @@ -9,27 +9,9 @@ //// [fatarrowfunctionsOptionalArgsErrors1.js] (function (arg1, arg2) { return 101; }); -(function () { - var arg = []; - for (var _i = 0; _i < arguments.length; _i++) { - arg[_i] = arguments[_i]; - } - return 102; -}); -(function () { - var arg = []; - for (var _i = 0; _i < arguments.length; _i++) { - arg[_i] = arguments[_i]; - } - return 103; -}); -(function () { - var arg = []; - for (var _i = 0; _i < arguments.length; _i++) { - arg[_i] = arguments[_i]; - } - return 104; -}); +(function () { return 102; }); +(function () { return 103; }); +(function () { return 104; }); // Uninitialized parameter makes the initialized one required (function (arg1, arg2) { if (arg1 === void 0) { arg1 = 1; } diff --git a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors3.js b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors3.js index d5d4b099a06be..150623dfd31dc 100644 --- a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors3.js +++ b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors3.js @@ -3,10 +3,4 @@ //// [fatarrowfunctionsOptionalArgsErrors3.js] -(function () { - var = []; - for (var _i = 0; _i < arguments.length; _i++) { - [_i] = arguments[_i]; - } - return 105; -}); +(function () { return 105; }); diff --git a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors4.js b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors4.js index 0fbf4b7486e7a..d9fddcff00c8c 100644 --- a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors4.js +++ b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors4.js @@ -53,17 +53,7 @@ foo(function (a) { return 110; }, (function (a) { return 111; }), function (a) { }, function (a) { if (a === void 0) { a = 0; } return 118; -}, function () { - var a = []; - for (var _i = 0; _i < arguments.length; _i++) { - a[_i] = arguments[_i]; - } - return 119; -}, function (a, b) { +}, function () { return 119; }, function (a, b) { if (b === void 0) { b = 0; } - var c = []; - for (var _i = 2; _i < arguments.length; _i++) { - c[_i - 2] = arguments[_i]; - } return 120; }, function (a) { return function (b) { return function (c) { return 121; }; }; }, false ? function (a) { return 0; } : function (b) { return 122; }); diff --git a/tests/baselines/reference/functionCall10.js b/tests/baselines/reference/functionCall10.js index 51ed76990b343..299d73ee24a73 100644 --- a/tests/baselines/reference/functionCall10.js +++ b/tests/baselines/reference/functionCall10.js @@ -7,12 +7,7 @@ foo(1, 'bar'); //// [functionCall10.js] -function foo() { - var a = []; - for (var _i = 0; _i < arguments.length; _i++) { - a[_i] = arguments[_i]; - } -} +function foo() { } ; foo(0, 1); foo('foo'); diff --git a/tests/baselines/reference/functionCall13.js b/tests/baselines/reference/functionCall13.js index ce57f43215e4d..a66ecafc8b47f 100644 --- a/tests/baselines/reference/functionCall13.js +++ b/tests/baselines/reference/functionCall13.js @@ -8,12 +8,7 @@ foo('foo', 1, 3); //// [functionCall13.js] -function foo(a) { - var b = []; - for (var _i = 1; _i < arguments.length; _i++) { - b[_i - 1] = arguments[_i]; - } -} +function foo(a) { } foo('foo', 1); foo('foo'); foo(); diff --git a/tests/baselines/reference/functionCall14.js b/tests/baselines/reference/functionCall14.js index 47447f46db5ca..f3af9f654361c 100644 --- a/tests/baselines/reference/functionCall14.js +++ b/tests/baselines/reference/functionCall14.js @@ -8,12 +8,7 @@ foo('foo', 1, 3); //// [functionCall14.js] -function foo(a) { - var b = []; - for (var _i = 1; _i < arguments.length; _i++) { - b[_i - 1] = arguments[_i]; - } -} +function foo(a) { } foo('foo', 1); foo('foo'); foo(); diff --git a/tests/baselines/reference/functionCall15.js b/tests/baselines/reference/functionCall15.js index 28fa4c917c867..baef02be27dc7 100644 --- a/tests/baselines/reference/functionCall15.js +++ b/tests/baselines/reference/functionCall15.js @@ -2,9 +2,4 @@ function foo(a?:string, b?:number, ...b:number[]){} //// [functionCall15.js] -function foo(a, b) { - var b = []; - for (var _i = 2; _i < arguments.length; _i++) { - b[_i - 2] = arguments[_i]; - } -} +function foo(a, b) { } diff --git a/tests/baselines/reference/functionCall16.js b/tests/baselines/reference/functionCall16.js index 187572a9a7e84..d9b416581a705 100644 --- a/tests/baselines/reference/functionCall16.js +++ b/tests/baselines/reference/functionCall16.js @@ -9,12 +9,7 @@ foo('foo', 'bar', 3); //// [functionCall16.js] -function foo(a, b) { - var c = []; - for (var _i = 2; _i < arguments.length; _i++) { - c[_i - 2] = arguments[_i]; - } -} +function foo(a, b) { } foo('foo', 1); foo('foo'); foo('foo', 'bar'); diff --git a/tests/baselines/reference/functionCall17.js b/tests/baselines/reference/functionCall17.js index 73f7fd6070b22..6249535821069 100644 --- a/tests/baselines/reference/functionCall17.js +++ b/tests/baselines/reference/functionCall17.js @@ -9,12 +9,7 @@ foo('foo', 'bar', 3, 4); //// [functionCall17.js] -function foo(a, b, c) { - var d = []; - for (var _i = 3; _i < arguments.length; _i++) { - d[_i - 3] = arguments[_i]; - } -} +function foo(a, b, c) { } foo('foo', 1); foo('foo'); foo(); diff --git a/tests/baselines/reference/functionOverloadsRecursiveGenericReturnType.js b/tests/baselines/reference/functionOverloadsRecursiveGenericReturnType.js index 978fbc941c870..aaa305d6237ec 100644 --- a/tests/baselines/reference/functionOverloadsRecursiveGenericReturnType.js +++ b/tests/baselines/reference/functionOverloadsRecursiveGenericReturnType.js @@ -26,9 +26,5 @@ var A = /** @class */ (function () { return A; }()); function Choice() { - var v_args = []; - for (var _i = 0; _i < arguments.length; _i++) { - v_args[_i] = arguments[_i]; - } return new A(); } diff --git a/tests/baselines/reference/functionWithUseStrictAndSimpleParameterList.js b/tests/baselines/reference/functionWithUseStrictAndSimpleParameterList.js index 1df304db7f50e..48bbbd58a1fc0 100644 --- a/tests/baselines/reference/functionWithUseStrictAndSimpleParameterList.js +++ b/tests/baselines/reference/functionWithUseStrictAndSimpleParameterList.js @@ -69,18 +69,10 @@ function container() { } function rest() { 'use strict'; - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } } function rest1(a) { 'use strict'; if (a === void 0) { a = 1; } - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } } function paramDefault(param) { 'use strict'; diff --git a/tests/baselines/reference/genericRestTypes.js b/tests/baselines/reference/genericRestTypes.js index 286e2aba1b73a..95275ca657f87 100644 --- a/tests/baselines/reference/genericRestTypes.js +++ b/tests/baselines/reference/genericRestTypes.js @@ -31,13 +31,7 @@ function assignmentWithComplexRest3() { "use strict"; // Repro from #25793 function assignmentWithComplexRest() { - var fn1 = function (x) { - var _ = []; - for (var _i = 1; _i < arguments.length; _i++) { - _[_i - 1] = arguments[_i]; - } - return x; - }; + var fn1 = function (x) { return x; }; var fn2 = fn1; } function assignmentWithComplexRest2() { @@ -45,12 +39,6 @@ function assignmentWithComplexRest2() { var fn2 = fn1; } function assignmentWithComplexRest3() { - var fn1 = function (x) { - var _ = []; - for (var _i = 1; _i < arguments.length; _i++) { - _[_i - 1] = arguments[_i]; - } - return x; - }; + var fn1 = function (x) { return x; }; var fn2 = fn1; } diff --git a/tests/baselines/reference/identicalTypesNoDifferByCheckOrder.js b/tests/baselines/reference/identicalTypesNoDifferByCheckOrder.js index a88b29ce254e6..2ec84672a4596 100644 --- a/tests/baselines/reference/identicalTypesNoDifferByCheckOrder.js +++ b/tests/baselines/reference/identicalTypesNoDifferByCheckOrder.js @@ -37,19 +37,9 @@ const comp2: FunctionComponent1 = null as any; needsComponentOfSomeProps2({ renderAs: comp2 }); //// [identicalTypesNoDifferByCheckOrder.js] -function needsComponentOfSomeProps3() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -} +function needsComponentOfSomeProps3() { } var comp3 = null; needsComponentOfSomeProps3({ renderAs: comp3 }); -function needsComponentOfSomeProps2() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -} +function needsComponentOfSomeProps2() { } var comp2 = null; needsComponentOfSomeProps2({ renderAs: comp2 }); diff --git a/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.js b/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.js index 0b2ba6191ef72..4dce5ba181680 100644 --- a/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.js +++ b/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.js @@ -19,12 +19,7 @@ function bar(x, y) { } ; // error at "y"; no error at "x" function func2(a, b, c) { } ; // error at "a,b,c" -function func3() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } -} +function func3() { } ; // error at "args" function func4(z, w) { if (z === void 0) { z = null; } diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.js b/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.js index 36a12ceadda5b..21ffeabb92a0a 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.js +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.js @@ -90,10 +90,6 @@ var SetOf = /** @class */ (function () { }()); /* ... etc ... */ function compose() { - var fns = []; - for (var _i = 0; _i < arguments.length; _i++) { - fns[_i] = arguments[_i]; - } return function (x) { return fns.reduce(function (prev, fn) { return fn(prev); }, x); }; } function map(fn) { diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.js b/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.js index 332de9e7409af..f35e057af8c33 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.js +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.js @@ -124,10 +124,6 @@ var SetOf = /** @class */ (function () { }()); /* ... etc ... */ function compose() { - var fns = []; - for (var _i = 0; _i < arguments.length; _i++) { - fns[_i] = arguments[_i]; - } return function (x) { return fns.reduce(function (prev, fn) { return fn(prev); }, x); }; } function map(fn) { diff --git a/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.js b/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.js index 97fefc0571c70..de0c107e561dc 100644 --- a/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.js +++ b/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.js @@ -12,24 +12,9 @@ i(a); // OK //// [inferTypeArgumentsInSignatureWithRestParameters.js] -function f(array) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } -} -function g(array) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } -} -function h(nonarray) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } -} +function f(array) { } +function g(array) { } +function h(nonarray) { } function i(array, opt) { } var a = [1, 2, 3, 4, 5]; f(a); // OK diff --git a/tests/baselines/reference/inferTypes1.js b/tests/baselines/reference/inferTypes1.js index 01dc5a797f224..f69b002f48392 100644 --- a/tests/baselines/reference/inferTypes1.js +++ b/tests/baselines/reference/inferTypes1.js @@ -195,10 +195,6 @@ var z1 = ex.customClass; var z2 = ex.obj.nested.attr; // Repros from #26856 function invoker(key) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } return function (obj) { return obj[key].apply(obj, args); }; } var result = invoker('test', true)({ test: function (a) { return 123; } }); diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams.js b/tests/baselines/reference/inheritedConstructorWithRestParams.js index 85d1f41d92662..235be705dddda 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams.js @@ -30,10 +30,6 @@ var __extends = (this && this.__extends) || (function () { })(); var Base = /** @class */ (function () { function Base() { - var a = []; - for (var _i = 0; _i < arguments.length; _i++) { - a[_i] = arguments[_i]; - } } return Base; }()); diff --git a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es5).js b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es5).js index 6e0c375edb21a..a17a0984e73c3 100644 --- a/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es5).js +++ b/tests/baselines/reference/invalidTaggedTemplateEscapeSequences(target=es5).js @@ -31,10 +31,6 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook return cooked; }; function tag(str) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } return str; } var a = tag(__makeTemplateObject(["123"], ["123"])); diff --git a/tests/baselines/reference/jsxNamespaceReexports.js b/tests/baselines/reference/jsxNamespaceReexports.js index 2c8403f770d10..23950706e8c32 100644 --- a/tests/baselines/reference/jsxNamespaceReexports.js +++ b/tests/baselines/reference/jsxNamespaceReexports.js @@ -19,12 +19,7 @@ const content = ; "use strict"; exports.__esModule = true; exports.createElement = void 0; -function createElement(element, props) { - var children = []; - for (var _i = 2; _i < arguments.length; _i++) { - children[_i - 2] = arguments[_i]; - } -} +function createElement(element, props) { } exports.createElement = createElement; //// [index.js] "use strict"; diff --git a/tests/baselines/reference/mixinAccessModifiers.js b/tests/baselines/reference/mixinAccessModifiers.js index 2d158f6841e04..6e226553d50b5 100644 --- a/tests/baselines/reference/mixinAccessModifiers.js +++ b/tests/baselines/reference/mixinAccessModifiers.js @@ -148,55 +148,31 @@ var __extends = (this && this.__extends) || (function () { })(); var Private = /** @class */ (function () { function Private() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } } return Private; }()); var Private2 = /** @class */ (function () { function Private2() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } } return Private2; }()); var Protected = /** @class */ (function () { function Protected() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } } return Protected; }()); var Protected2 = /** @class */ (function () { function Protected2() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } } return Protected2; }()); var Public = /** @class */ (function () { function Public() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } } return Public; }()); var Public2 = /** @class */ (function () { function Public2() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } } return Public2; }()); diff --git a/tests/baselines/reference/newWithSpread.js b/tests/baselines/reference/newWithSpread.js index 56a51291a8cb6..7ecea858b9d17 100644 --- a/tests/baselines/reference/newWithSpread.js +++ b/tests/baselines/reference/newWithSpread.js @@ -106,23 +106,11 @@ var __spreadArrays = (this && this.__spreadArrays) || function () { }; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; function f(x, y) { - var z = []; - for (var _i = 2; _i < arguments.length; _i++) { - z[_i - 2] = arguments[_i]; - } } function f2() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } } var B = /** @class */ (function () { function B(x, y) { - var z = []; - for (var _i = 2; _i < arguments.length; _i++) { - z[_i - 2] = arguments[_i]; - } } return B; }()); diff --git a/tests/baselines/reference/newWithSpreadES5.js b/tests/baselines/reference/newWithSpreadES5.js index ddb219a498732..174d7918fde6d 100644 --- a/tests/baselines/reference/newWithSpreadES5.js +++ b/tests/baselines/reference/newWithSpreadES5.js @@ -105,23 +105,10 @@ var __spreadArrays = (this && this.__spreadArrays) || function () { }; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; function f(x, y) { - var z = []; - for (var _i = 2; _i < arguments.length; _i++) { - z[_i - 2] = arguments[_i]; - } -} -function f2() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } } +function f2() { } var B = /** @class */ (function () { function B(x, y) { - var z = []; - for (var _i = 2; _i < arguments.length; _i++) { - z[_i - 2] = arguments[_i]; - } } return B; }()); diff --git a/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.js b/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.js index 4371a60879930..de57e8cf6b7dd 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.js +++ b/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.js @@ -55,19 +55,9 @@ function f4(x, y, z) { } // Implicit-'any' errors for x, and z. function f5(x, y, z) { } // Implicit-'any[]' error for r. -function f6() { - var r = []; - for (var _i = 0; _i < arguments.length; _i++) { - r[_i] = arguments[_i]; - } -} +function f6() { } // Implicit-'any'/'any[]' errors for x, r. -function f7(x) { - var r = []; - for (var _i = 1; _i < arguments.length; _i++) { - r[_i - 1] = arguments[_i]; - } -} +function f7(x) { } function f8(x3, y3) { } // No implicit-'any' errors. var f9 = function () { return ""; }; @@ -78,18 +68,6 @@ var f11 = function (x, y, z) { return ""; }; // Implicit-'any' errors for x and z. var f12 = function (x, y, z) { return ""; }; // Implicit-'any[]' error for r. -var f13 = function () { - var r = []; - for (var _i = 0; _i < arguments.length; _i++) { - r[_i] = arguments[_i]; - } - return ""; -}; +var f13 = function () { return ""; }; // Implicit-'any'/'any[]' errors for x, r. -var f14 = function (x) { - var r = []; - for (var _i = 1; _i < arguments.length; _i++) { - r[_i - 1] = arguments[_i]; - } - return ""; -}; +var f14 = function (x) { return ""; }; diff --git a/tests/baselines/reference/noImplicitAnyParametersInClass.js b/tests/baselines/reference/noImplicitAnyParametersInClass.js index 1cfccb39778ce..3a03a2a1ccfbb 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInClass.js +++ b/tests/baselines/reference/noImplicitAnyParametersInClass.js @@ -103,21 +103,9 @@ var C = /** @class */ (function () { // Implicit-'any' errors for x and z. this.pub_f12 = function (x, y, z) { return ""; }; // Implicit-'any[]' error for r. - this.pub_f13 = function () { - var r = []; - for (var _i = 0; _i < arguments.length; _i++) { - r[_i] = arguments[_i]; - } - return ""; - }; + this.pub_f13 = function () { return ""; }; // Implicit-'any'/'any[]' errors for x, r. - this.pub_f14 = function (x) { - var r = []; - for (var _i = 1; _i < arguments.length; _i++) { - r[_i - 1] = arguments[_i]; - } - return ""; - }; + this.pub_f14 = function (x) { return ""; }; // No implicit-'any' errors. this.priv_f9 = function () { return ""; }; // Implicit-'any' errors for x. @@ -127,21 +115,9 @@ var C = /** @class */ (function () { // Implicit-'any' errors for x and z. this.priv_f12 = function (x, y, z) { return ""; }; // Implicit-'any[]' error for r. - this.priv_f13 = function () { - var r = []; - for (var _i = 0; _i < arguments.length; _i++) { - r[_i] = arguments[_i]; - } - return ""; - }; + this.priv_f13 = function () { return ""; }; // Implicit-'any'/'any[]' errors for x, r. - this.priv_f14 = function (x) { - var r = []; - for (var _i = 1; _i < arguments.length; _i++) { - r[_i - 1] = arguments[_i]; - } - return ""; - }; + this.priv_f14 = function (x) { return ""; }; } // No implicit-'any' errors. C.prototype.pub_f1 = function () { }; @@ -154,19 +130,9 @@ var C = /** @class */ (function () { // Implicit-'any' errors for x, and z. C.prototype.pub_f5 = function (x, y, z) { }; // Implicit-'any[]' errors for r. - C.prototype.pub_f6 = function () { - var r = []; - for (var _i = 0; _i < arguments.length; _i++) { - r[_i] = arguments[_i]; - } - }; + C.prototype.pub_f6 = function () { }; // Implicit-'any'/'any[]' errors for x, r. - C.prototype.pub_f7 = function (x) { - var r = []; - for (var _i = 1; _i < arguments.length; _i++) { - r[_i - 1] = arguments[_i]; - } - }; + C.prototype.pub_f7 = function (x) { }; C.prototype.pub_f8 = function (x3, y3) { }; /////////////////////////////////////////// // No implicit-'any' errors. @@ -180,19 +146,9 @@ var C = /** @class */ (function () { // Implicit-'any' errors for x, and z. C.prototype.priv_f5 = function (x, y, z) { }; // Implicit-'any[]' errors for r. - C.prototype.priv_f6 = function () { - var r = []; - for (var _i = 0; _i < arguments.length; _i++) { - r[_i] = arguments[_i]; - } - }; + C.prototype.priv_f6 = function () { }; // Implicit-'any'/'any[]' errors for x, r. - C.prototype.priv_f7 = function (x) { - var r = []; - for (var _i = 1; _i < arguments.length; _i++) { - r[_i - 1] = arguments[_i]; - } - }; + C.prototype.priv_f7 = function (x) { }; C.prototype.priv_f8 = function (x3, y3) { }; return C; }()); diff --git a/tests/baselines/reference/noImplicitAnyParametersInModule.js b/tests/baselines/reference/noImplicitAnyParametersInModule.js index d34f52eaa4f19..5b0282f96d572 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInModule.js +++ b/tests/baselines/reference/noImplicitAnyParametersInModule.js @@ -59,19 +59,9 @@ var M; // Implicit-'any' errors for x and z. function m_f5(x, y, z) { } // Implicit-'any[]' error for r. - function m_f6() { - var r = []; - for (var _i = 0; _i < arguments.length; _i++) { - r[_i] = arguments[_i]; - } - } + function m_f6() { } // Implicit-'any'/'any[]' errors for x and r. - function m_f7(x) { - var r = []; - for (var _i = 1; _i < arguments.length; _i++) { - r[_i - 1] = arguments[_i]; - } - } + function m_f7(x) { } function m_f8(x3, y3) { } // No implicit-'any' errors. var m_f9 = function () { return ""; }; @@ -82,19 +72,7 @@ var M; // Implicit-'any' errors for x and z. var m_f12 = function (x, y, z) { return ""; }; // Implicit-'any[]' errors for r. - var m_f13 = function () { - var r = []; - for (var _i = 0; _i < arguments.length; _i++) { - r[_i] = arguments[_i]; - } - return ""; - }; + var m_f13 = function () { return ""; }; // Implicit-'any'/'any[]' errors for x and r. - var m_f14 = function (x) { - var r = []; - for (var _i = 1; _i < arguments.length; _i++) { - r[_i - 1] = arguments[_i]; - } - return ""; - }; + var m_f14 = function (x) { return ""; }; })(M || (M = {})); diff --git a/tests/baselines/reference/nonArrayRestArgs.js b/tests/baselines/reference/nonArrayRestArgs.js index 813f7141b5ccd..52d5da15f93ee 100644 --- a/tests/baselines/reference/nonArrayRestArgs.js +++ b/tests/baselines/reference/nonArrayRestArgs.js @@ -6,10 +6,6 @@ function foo(...rest: number) { // error //// [nonArrayRestArgs.js] function foo() { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i] = arguments[_i]; - } var x = rest[0]; return x; } diff --git a/tests/baselines/reference/optionalBindingParametersInOverloads1.js b/tests/baselines/reference/optionalBindingParametersInOverloads1.js index 05ad934c260bc..bbe95c53d5be4 100644 --- a/tests/baselines/reference/optionalBindingParametersInOverloads1.js +++ b/tests/baselines/reference/optionalBindingParametersInOverloads1.js @@ -10,10 +10,6 @@ foo([false, 0, ""]); //// [optionalBindingParametersInOverloads1.js] function foo() { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i] = arguments[_i]; - } } foo(["", 0, false]); foo([false, 0, ""]); diff --git a/tests/baselines/reference/optionalBindingParametersInOverloads2.js b/tests/baselines/reference/optionalBindingParametersInOverloads2.js index 956441b89e817..28fa6351c48b0 100644 --- a/tests/baselines/reference/optionalBindingParametersInOverloads2.js +++ b/tests/baselines/reference/optionalBindingParametersInOverloads2.js @@ -10,10 +10,6 @@ foo({ x: false, y: 0, z: "" }); //// [optionalBindingParametersInOverloads2.js] function foo() { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i] = arguments[_i]; - } } foo({ x: "", y: 0, z: false }); foo({ x: false, y: 0, z: "" }); diff --git a/tests/baselines/reference/overloadGenericFunctionWithRestArgs.js b/tests/baselines/reference/overloadGenericFunctionWithRestArgs.js index bb425c39a6f2c..70521e2737284 100644 --- a/tests/baselines/reference/overloadGenericFunctionWithRestArgs.js +++ b/tests/baselines/reference/overloadGenericFunctionWithRestArgs.js @@ -22,9 +22,5 @@ var A = /** @class */ (function () { return A; }()); function Choice() { - var v_args = []; - for (var _i = 0; _i < arguments.length; _i++) { - v_args[_i] = arguments[_i]; - } return new A(); } diff --git a/tests/baselines/reference/overloadedConstructorFixesInferencesAppropriately.js b/tests/baselines/reference/overloadedConstructorFixesInferencesAppropriately.js index e911b405074ca..ba114a27c4a15 100644 --- a/tests/baselines/reference/overloadedConstructorFixesInferencesAppropriately.js +++ b/tests/baselines/reference/overloadedConstructorFixesInferencesAppropriately.js @@ -32,10 +32,6 @@ new AsyncLoader({ "use strict"; var AsyncLoader = /** @class */ (function () { function AsyncLoader() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } } return AsyncLoader; }()); diff --git a/tests/baselines/reference/parameterListAsTupleType.js b/tests/baselines/reference/parameterListAsTupleType.js index 0c831e36edb00..6f2ca6a2a94b7 100644 --- a/tests/baselines/reference/parameterListAsTupleType.js +++ b/tests/baselines/reference/parameterListAsTupleType.js @@ -30,12 +30,7 @@ function foo(a, b) { } var x = function (a) { return 5; }; var a = ['should-not-work']; // works, but shouldn't -function t() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } -} // should work +function t() { } // should work var C = /** @class */ (function () { function C(a, b) { } @@ -43,10 +38,6 @@ var C = /** @class */ (function () { }()); var D = /** @class */ (function () { function D(a) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } } return D; }()); diff --git a/tests/baselines/reference/parenthesizedContexualTyping2.js b/tests/baselines/reference/parenthesizedContexualTyping2.js index 48b9355ca317a..007eb9dbd4eec 100644 --- a/tests/baselines/reference/parenthesizedContexualTyping2.js +++ b/tests/baselines/reference/parenthesizedContexualTyping2.js @@ -43,10 +43,6 @@ var obj2: ObjType = ({ x: x => (x, undefined), y: y => (y, undefined) }); // Since 'any' cannot be invoked with type arguments, we should get errors // back if contextual typing is not taking effect. function fun() { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i] = arguments[_i]; - } return undefined; } var a = fun(function (x) { x(undefined); return x; }, 10); diff --git a/tests/baselines/reference/parser509668.js b/tests/baselines/reference/parser509668.js index 6864244e2761d..2f8acbb92738b 100644 --- a/tests/baselines/reference/parser509668.js +++ b/tests/baselines/reference/parser509668.js @@ -8,10 +8,6 @@ class Foo3 { var Foo3 = /** @class */ (function () { // Doesn't work, but should function Foo3() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } this.args = args; } return Foo3; diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration18.js b/tests/baselines/reference/parserMemberAccessorDeclaration18.js index 5699251facb91..ca36a39d86049 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration18.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration18.js @@ -8,12 +8,7 @@ var C = /** @class */ (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - set: function () { - var a = []; - for (var _i = 0; _i < arguments.length; _i++) { - a[_i] = arguments[_i]; - } - }, + set: function () { }, enumerable: false, configurable: true }); diff --git a/tests/baselines/reference/parserParameterList10.js b/tests/baselines/reference/parserParameterList10.js index 906e44154ee30..6752df9c170ee 100644 --- a/tests/baselines/reference/parserParameterList10.js +++ b/tests/baselines/reference/parserParameterList10.js @@ -7,11 +7,6 @@ class C { var C = /** @class */ (function () { function C() { } - C.prototype.foo = function () { - var bar = []; - for (var _i = 0; _i < arguments.length; _i++) { - bar[_i] = arguments[_i]; - } - }; + C.prototype.foo = function () { }; return C; }()); diff --git a/tests/baselines/reference/parserParameterList11.js b/tests/baselines/reference/parserParameterList11.js index c736e5fddb6b7..ae63bb90396f3 100644 --- a/tests/baselines/reference/parserParameterList11.js +++ b/tests/baselines/reference/parserParameterList11.js @@ -2,10 +2,4 @@ (...arg?) => 102; //// [parserParameterList11.js] -(function () { - var arg = []; - for (var _i = 0; _i < arguments.length; _i++) { - arg[_i] = arguments[_i]; - } - return 102; -}); +(function () { return 102; }); diff --git a/tests/baselines/reference/parserParameterList9.js b/tests/baselines/reference/parserParameterList9.js index e81a1f2d03d42..e4c21ebe88b93 100644 --- a/tests/baselines/reference/parserParameterList9.js +++ b/tests/baselines/reference/parserParameterList9.js @@ -7,11 +7,6 @@ class C { var C = /** @class */ (function () { function C() { } - C.prototype.foo = function () { - var bar = []; - for (var _i = 0; _i < arguments.length; _i++) { - bar[_i] = arguments[_i]; - } - }; + C.prototype.foo = function () { }; return C; }()); diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js index 89f698cff0e5c..b7d47f03361fb 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js @@ -68,26 +68,11 @@ test(function () { }); // fewer args test(function (t1) { }); // rest arg -test(function () { - var ts = []; - for (var _i = 0; _i < arguments.length; _i++) { - ts[_i] = arguments[_i]; - } -}); +test(function () { }); // source function has rest arg testRest(function (t1) { }); testRest(function (t1, t2, t3) { }); testRest(function (t1, t2, t3) { }); testRest(function (t1, t2, t3) { }); -testRest(function (t2) { - var t3 = []; - for (var _i = 1; _i < arguments.length; _i++) { - t3[_i - 1] = arguments[_i]; - } -}); -testRest(function (t2) { - var t3 = []; - for (var _i = 1; _i < arguments.length; _i++) { - t3[_i - 1] = arguments[_i]; - } -}); +testRest(function (t2) { }); +testRest(function (t2) { }); diff --git a/tests/baselines/reference/recursiveTypeRelations.js b/tests/baselines/reference/recursiveTypeRelations.js index 5ee456dee116c..78dc4ff0ac898 100644 --- a/tests/baselines/reference/recursiveTypeRelations.js +++ b/tests/baselines/reference/recursiveTypeRelations.js @@ -47,10 +47,6 @@ var Query = /** @class */ (function () { return Query; }()); function css(styles) { - var classNames = []; - for (var _i = 1; _i < arguments.length; _i++) { - classNames[_i - 1] = arguments[_i]; - } var args = classNames.map(function (arg) { if (arg == null) { return null; diff --git a/tests/baselines/reference/requiredInitializedParameter1.js b/tests/baselines/reference/requiredInitializedParameter1.js index 0fe07503056cb..30734807e8c46 100644 --- a/tests/baselines/reference/requiredInitializedParameter1.js +++ b/tests/baselines/reference/requiredInitializedParameter1.js @@ -32,10 +32,6 @@ function f3(a, b, c) { } function f4(a, b) { if (b === void 0) { b = 0; } - var c = []; - for (var _i = 2; _i < arguments.length; _i++) { - c[_i - 2] = arguments[_i]; - } } f1(0, 1, 2); f2(0, 1, 2); diff --git a/tests/baselines/reference/restArgMissingName.js b/tests/baselines/reference/restArgMissingName.js index f4ec647f7e4fb..bbd3641478e28 100644 --- a/tests/baselines/reference/restArgMissingName.js +++ b/tests/baselines/reference/restArgMissingName.js @@ -3,9 +3,4 @@ function sum (...) {} //// [restArgMissingName.js] -function sum() { - var = []; - for (var _i = 0; _i < arguments.length; _i++) { - [_i] = arguments[_i]; - } -} +function sum() { } diff --git a/tests/baselines/reference/restParamAsOptional.js b/tests/baselines/reference/restParamAsOptional.js index 2f6da684c0edd..717df925f3590 100644 --- a/tests/baselines/reference/restParamAsOptional.js +++ b/tests/baselines/reference/restParamAsOptional.js @@ -3,15 +3,5 @@ function f(...x?) { } function f2(...x = []) { } //// [restParamAsOptional.js] -function f() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -} -function f2() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -} +function f() { } +function f2() { } diff --git a/tests/baselines/reference/restParamModifier2.js b/tests/baselines/reference/restParamModifier2.js index 50b91b302c6b0..0de1f12c6ee16 100644 --- a/tests/baselines/reference/restParamModifier2.js +++ b/tests/baselines/reference/restParamModifier2.js @@ -6,10 +6,6 @@ class C { //// [restParamModifier2.js] var C = /** @class */ (function () { function C() { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i] = arguments[_i]; - } this.rest = rest; } return C; diff --git a/tests/baselines/reference/restParameterAssignmentCompatibility.js b/tests/baselines/reference/restParameterAssignmentCompatibility.js index 5ad44dd1e0592..8ad3accaf7181 100644 --- a/tests/baselines/reference/restParameterAssignmentCompatibility.js +++ b/tests/baselines/reference/restParameterAssignmentCompatibility.js @@ -31,10 +31,6 @@ var T = /** @class */ (function () { function T() { } T.prototype.m = function () { - var p3 = []; - for (var _i = 0; _i < arguments.length; _i++) { - p3[_i] = arguments[_i]; - } }; return T; }()); diff --git a/tests/baselines/reference/restParameterNoTypeAnnotation.js b/tests/baselines/reference/restParameterNoTypeAnnotation.js index b22b531675daf..4a866bd298523 100644 --- a/tests/baselines/reference/restParameterNoTypeAnnotation.js +++ b/tests/baselines/reference/restParameterNoTypeAnnotation.js @@ -7,10 +7,6 @@ function foo(...rest) { //// [restParameterNoTypeAnnotation.js] function foo() { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i] = arguments[_i]; - } var x = rest[0]; return x; } diff --git a/tests/baselines/reference/restParameterWithBindingPattern1.js b/tests/baselines/reference/restParameterWithBindingPattern1.js index d872d23245067..1ca4130577f27 100644 --- a/tests/baselines/reference/restParameterWithBindingPattern1.js +++ b/tests/baselines/reference/restParameterWithBindingPattern1.js @@ -2,11 +2,5 @@ function a(...{a, b}) { } //// [restParameterWithBindingPattern1.js] -function a() { - var _a = []; - for (var _i = 0; _i < arguments.length; _i++) { - _a[_i] = arguments[_i]; - } - var a = _a.a, b = _a.b; -} +function a() { } //# sourceMappingURL=restParameterWithBindingPattern1.js.map \ No newline at end of file diff --git a/tests/baselines/reference/restParameterWithBindingPattern1.js.map b/tests/baselines/reference/restParameterWithBindingPattern1.js.map index c6d26a7452a4b..68e28fef4d9c8 100644 --- a/tests/baselines/reference/restParameterWithBindingPattern1.js.map +++ b/tests/baselines/reference/restParameterWithBindingPattern1.js.map @@ -1,3 +1,3 @@ //// [restParameterWithBindingPattern1.js.map] -{"version":3,"file":"restParameterWithBindingPattern1.js","sourceRoot":"","sources":["restParameterWithBindingPattern1.ts"],"names":[],"mappings":"AAAA,SAAS,CAAC;IAAC,YAAS;SAAT,UAAS,EAAT,qBAAS,EAAT,IAAS;QAAT,uBAAS;;IAAT,IAAI,CAAC,OAAA,EAAE,CAAC,OAAA,CAAC;AAAI,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,ZnVuY3Rpb24gYSgpIHsNCiAgICB2YXIgX2EgPSBbXTsNCiAgICBmb3IgKHZhciBfaSA9IDA7IF9pIDwgYXJndW1lbnRzLmxlbmd0aDsgX2krKykgew0KICAgICAgICBfYVtfaV0gPSBhcmd1bWVudHNbX2ldOw0KICAgIH0NCiAgICB2YXIgYSA9IF9hLmEsIGIgPSBfYS5iOw0KfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9cmVzdFBhcmFtZXRlcldpdGhCaW5kaW5nUGF0dGVybjEuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzdFBhcmFtZXRlcldpdGhCaW5kaW5nUGF0dGVybjEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJyZXN0UGFyYW1ldGVyV2l0aEJpbmRpbmdQYXR0ZXJuMS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxTQUFTLENBQUM7SUFBQyxZQUFTO1NBQVQsVUFBUyxFQUFULHFCQUFTLEVBQVQsSUFBUztRQUFULHVCQUFTOztJQUFULElBQUksQ0FBQyxPQUFBLEVBQUUsQ0FBQyxPQUFBLENBQUM7QUFBSSxDQUFDIn0=,ZnVuY3Rpb24gYSguLi57YSwgYn0pIHsgfQ== +{"version":3,"file":"restParameterWithBindingPattern1.js","sourceRoot":"","sources":["restParameterWithBindingPattern1.ts"],"names":[],"mappings":"AAAA,SAAS,CAAC,KAAc,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,ZnVuY3Rpb24gYSgpIHsgfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9cmVzdFBhcmFtZXRlcldpdGhCaW5kaW5nUGF0dGVybjEuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzdFBhcmFtZXRlcldpdGhCaW5kaW5nUGF0dGVybjEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJyZXN0UGFyYW1ldGVyV2l0aEJpbmRpbmdQYXR0ZXJuMS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxTQUFTLENBQUMsS0FBYyxDQUFDIn0=,ZnVuY3Rpb24gYSguLi57YSwgYn0pIHsgfQ== diff --git a/tests/baselines/reference/restParameterWithBindingPattern1.sourcemap.txt b/tests/baselines/reference/restParameterWithBindingPattern1.sourcemap.txt index 4c330ddf7771d..0ecee8889acb6 100644 --- a/tests/baselines/reference/restParameterWithBindingPattern1.sourcemap.txt +++ b/tests/baselines/reference/restParameterWithBindingPattern1.sourcemap.txt @@ -8,89 +8,22 @@ sources: restParameterWithBindingPattern1.ts emittedFile:tests/cases/compiler/restParameterWithBindingPattern1.js sourceFile:restParameterWithBindingPattern1.ts ------------------------------------------------------------------- ->>>function a() { +>>>function a() { } 1 > 2 >^^^^^^^^^ 3 > ^ -4 > ^^^^^^^-> +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 2 >function 3 > a +4 > (...{a, b}) { +5 > } 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) 2 >Emitted(1, 10) Source(1, 10) + SourceIndex(0) 3 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) ---- ->>> var _a = []; -1->^^^^ -2 > ^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1->( -2 > ...{a, b} -1->Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 17) Source(1, 21) + SourceIndex(0) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...{a, b} -3 > -4 > ...{a, b} -5 > -6 > ...{a, b} -1->Emitted(3, 10) Source(1, 12) + SourceIndex(0) -2 >Emitted(3, 20) Source(1, 21) + SourceIndex(0) -3 >Emitted(3, 22) Source(1, 12) + SourceIndex(0) -4 >Emitted(3, 43) Source(1, 21) + SourceIndex(0) -5 >Emitted(3, 45) Source(1, 12) + SourceIndex(0) -6 >Emitted(3, 49) Source(1, 21) + SourceIndex(0) ---- ->>> _a[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...{a, b} -1 >Emitted(4, 9) Source(1, 12) + SourceIndex(0) -2 >Emitted(4, 32) Source(1, 21) + SourceIndex(0) ---- ->>> } ->>> var a = _a.a, b = _a.b; -1 >^^^^ -2 > ^^^^ -3 > ^ -4 > ^^^^^^^ -5 > ^^ -6 > ^ -7 > ^^^^^^^ -8 > ^ -1 > -2 > ...{ -3 > a -4 > -5 > , -6 > b -7 > -8 > } -1 >Emitted(6, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(6, 9) Source(1, 16) + SourceIndex(0) -3 >Emitted(6, 10) Source(1, 17) + SourceIndex(0) -4 >Emitted(6, 17) Source(1, 17) + SourceIndex(0) -5 >Emitted(6, 19) Source(1, 19) + SourceIndex(0) -6 >Emitted(6, 20) Source(1, 20) + SourceIndex(0) -7 >Emitted(6, 27) Source(1, 20) + SourceIndex(0) -8 >Emitted(6, 28) Source(1, 21) + SourceIndex(0) ---- ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(7, 1) Source(1, 25) + SourceIndex(0) -2 >Emitted(7, 2) Source(1, 26) + SourceIndex(0) +4 >Emitted(1, 16) Source(1, 25) + SourceIndex(0) +5 >Emitted(1, 17) Source(1, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=restParameterWithBindingPattern1.js.map \ No newline at end of file diff --git a/tests/baselines/reference/restParameterWithBindingPattern2.js b/tests/baselines/reference/restParameterWithBindingPattern2.js index acef0954194c4..50015c914a70c 100644 --- a/tests/baselines/reference/restParameterWithBindingPattern2.js +++ b/tests/baselines/reference/restParameterWithBindingPattern2.js @@ -2,11 +2,5 @@ function a(...[a, b]) { } //// [restParameterWithBindingPattern2.js] -function a() { - var _a = []; - for (var _i = 0; _i < arguments.length; _i++) { - _a[_i] = arguments[_i]; - } - var a = _a[0], b = _a[1]; -} +function a() { } //# sourceMappingURL=restParameterWithBindingPattern2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/restParameterWithBindingPattern2.js.map b/tests/baselines/reference/restParameterWithBindingPattern2.js.map index e6be023f4f567..a33e22307933a 100644 --- a/tests/baselines/reference/restParameterWithBindingPattern2.js.map +++ b/tests/baselines/reference/restParameterWithBindingPattern2.js.map @@ -1,3 +1,3 @@ //// [restParameterWithBindingPattern2.js.map] -{"version":3,"file":"restParameterWithBindingPattern2.js","sourceRoot":"","sources":["restParameterWithBindingPattern2.ts"],"names":[],"mappings":"AAAA,SAAS,CAAC;IAAC,YAAS;SAAT,UAAS,EAAT,qBAAS,EAAT,IAAS;QAAT,uBAAS;;IAAT,IAAI,CAAC,QAAA,EAAE,CAAC,QAAA,CAAC;AAAI,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,ZnVuY3Rpb24gYSgpIHsNCiAgICB2YXIgX2EgPSBbXTsNCiAgICBmb3IgKHZhciBfaSA9IDA7IF9pIDwgYXJndW1lbnRzLmxlbmd0aDsgX2krKykgew0KICAgICAgICBfYVtfaV0gPSBhcmd1bWVudHNbX2ldOw0KICAgIH0NCiAgICB2YXIgYSA9IF9hWzBdLCBiID0gX2FbMV07DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1yZXN0UGFyYW1ldGVyV2l0aEJpbmRpbmdQYXR0ZXJuMi5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzdFBhcmFtZXRlcldpdGhCaW5kaW5nUGF0dGVybjIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJyZXN0UGFyYW1ldGVyV2l0aEJpbmRpbmdQYXR0ZXJuMi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxTQUFTLENBQUM7SUFBQyxZQUFTO1NBQVQsVUFBUyxFQUFULHFCQUFTLEVBQVQsSUFBUztRQUFULHVCQUFTOztJQUFULElBQUksQ0FBQyxRQUFBLEVBQUUsQ0FBQyxRQUFBLENBQUM7QUFBSSxDQUFDIn0=,ZnVuY3Rpb24gYSguLi5bYSwgYl0pIHsgfQ== +{"version":3,"file":"restParameterWithBindingPattern2.js","sourceRoot":"","sources":["restParameterWithBindingPattern2.ts"],"names":[],"mappings":"AAAA,SAAS,CAAC,KAAc,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,ZnVuY3Rpb24gYSgpIHsgfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9cmVzdFBhcmFtZXRlcldpdGhCaW5kaW5nUGF0dGVybjIuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzdFBhcmFtZXRlcldpdGhCaW5kaW5nUGF0dGVybjIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJyZXN0UGFyYW1ldGVyV2l0aEJpbmRpbmdQYXR0ZXJuMi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxTQUFTLENBQUMsS0FBYyxDQUFDIn0=,ZnVuY3Rpb24gYSguLi5bYSwgYl0pIHsgfQ== diff --git a/tests/baselines/reference/restParameterWithBindingPattern2.sourcemap.txt b/tests/baselines/reference/restParameterWithBindingPattern2.sourcemap.txt index c49f60a4fc22b..79359cf0cadfc 100644 --- a/tests/baselines/reference/restParameterWithBindingPattern2.sourcemap.txt +++ b/tests/baselines/reference/restParameterWithBindingPattern2.sourcemap.txt @@ -8,89 +8,22 @@ sources: restParameterWithBindingPattern2.ts emittedFile:tests/cases/compiler/restParameterWithBindingPattern2.js sourceFile:restParameterWithBindingPattern2.ts ------------------------------------------------------------------- ->>>function a() { +>>>function a() { } 1 > 2 >^^^^^^^^^ 3 > ^ -4 > ^^^^^^^-> +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 2 >function 3 > a +4 > (...[a, b]) { +5 > } 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) 2 >Emitted(1, 10) Source(1, 10) + SourceIndex(0) 3 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) ---- ->>> var _a = []; -1->^^^^ -2 > ^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1->( -2 > ...[a, b] -1->Emitted(2, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(2, 17) Source(1, 21) + SourceIndex(0) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...[a, b] -3 > -4 > ...[a, b] -5 > -6 > ...[a, b] -1->Emitted(3, 10) Source(1, 12) + SourceIndex(0) -2 >Emitted(3, 20) Source(1, 21) + SourceIndex(0) -3 >Emitted(3, 22) Source(1, 12) + SourceIndex(0) -4 >Emitted(3, 43) Source(1, 21) + SourceIndex(0) -5 >Emitted(3, 45) Source(1, 12) + SourceIndex(0) -6 >Emitted(3, 49) Source(1, 21) + SourceIndex(0) ---- ->>> _a[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...[a, b] -1 >Emitted(4, 9) Source(1, 12) + SourceIndex(0) -2 >Emitted(4, 32) Source(1, 21) + SourceIndex(0) ---- ->>> } ->>> var a = _a[0], b = _a[1]; -1 >^^^^ -2 > ^^^^ -3 > ^ -4 > ^^^^^^^^ -5 > ^^ -6 > ^ -7 > ^^^^^^^^ -8 > ^ -1 > -2 > ...[ -3 > a -4 > -5 > , -6 > b -7 > -8 > ] -1 >Emitted(6, 5) Source(1, 12) + SourceIndex(0) -2 >Emitted(6, 9) Source(1, 16) + SourceIndex(0) -3 >Emitted(6, 10) Source(1, 17) + SourceIndex(0) -4 >Emitted(6, 18) Source(1, 17) + SourceIndex(0) -5 >Emitted(6, 20) Source(1, 19) + SourceIndex(0) -6 >Emitted(6, 21) Source(1, 20) + SourceIndex(0) -7 >Emitted(6, 29) Source(1, 20) + SourceIndex(0) -8 >Emitted(6, 30) Source(1, 21) + SourceIndex(0) ---- ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(7, 1) Source(1, 25) + SourceIndex(0) -2 >Emitted(7, 2) Source(1, 26) + SourceIndex(0) +4 >Emitted(1, 16) Source(1, 25) + SourceIndex(0) +5 >Emitted(1, 17) Source(1, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=restParameterWithBindingPattern2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/restParameterWithBindingPattern3.js b/tests/baselines/reference/restParameterWithBindingPattern3.js index 3894d0f340085..040ef6eff4ebb 100644 --- a/tests/baselines/reference/restParameterWithBindingPattern3.js +++ b/tests/baselines/reference/restParameterWithBindingPattern3.js @@ -21,38 +21,8 @@ var __rest = (this && this.__rest) || function (s, e) { } return t; }; -function a() { - var _a = []; - for (var _i = 0; _i < arguments.length; _i++) { - _a[_i] = arguments[_i]; - } - var _b = _a[0], a = _b === void 0 ? 1 : _b, _c = _a[1], b = _c === void 0 ? true : _c; -} -function b() { - var _a = []; - for (var _i = 0; _i < arguments.length; _i++) { - _a[_i] = arguments[_i]; - } - var _b = _a.slice(0), foo = _b === void 0 ? [] : _b; -} -function c() { - var _a = []; - for (var _i = 0; _i < arguments.length; _i++) { - _a[_i] = arguments[_i]; - } - var a = _a[0], length = _a.length, d = _a[3]; -} -function d() { - var _a = []; - for (var _i = 0; _i < arguments.length; _i++) { - _a[_i] = arguments[_i]; - } - var a = _a[0], d = _a[3]; -} -function e() { - var _a = []; - for (var _i = 0; _i < arguments.length; _i++) { - _a[_i] = arguments[_i]; - } - var _b = _a[0], a = _b === void 0 ? 1 : _b, _c = _a[1], b = _c === void 0 ? true : _c, rest = __rest(_a, ["0", "1"]); -} +function a() { } +function b() { } +function c() { } +function d() { } +function e() { var _a = _c[0], a = _a === void 0 ? 1 : _a, _b = _c[1], b = _b === void 0 ? true : _b, rest = __rest(_c, ["0", "1"]); } diff --git a/tests/baselines/reference/restParameterWithoutAnnotationIsAnyArray.js b/tests/baselines/reference/restParameterWithoutAnnotationIsAnyArray.js index 519634f41e238..3b93762c96878 100644 --- a/tests/baselines/reference/restParameterWithoutAnnotationIsAnyArray.js +++ b/tests/baselines/reference/restParameterWithoutAnnotationIsAnyArray.js @@ -28,53 +28,18 @@ var b = { //// [restParameterWithoutAnnotationIsAnyArray.js] // Rest parameters without type annotations are 'any', errors only for the functions with 2 rest params -function foo() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -} -var f = function foo() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -}; -var f2 = function () { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } -}; +function foo() { } +var f = function foo() { }; +var f2 = function () { }; var C = /** @class */ (function () { function C() { } - C.prototype.foo = function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - }; + C.prototype.foo = function () { }; return C; }()); var a; var b = { - foo: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - }, - a: function foo() { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } - }, - b: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - } + foo: function () { }, + a: function foo() { }, + b: function () { } }; diff --git a/tests/baselines/reference/restParameters.js b/tests/baselines/reference/restParameters.js index 2e5b7bb4c928a..f71401d2f180b 100644 --- a/tests/baselines/reference/restParameters.js +++ b/tests/baselines/reference/restParameters.js @@ -8,27 +8,7 @@ function f20(a:string, b?:string, ...c:number[]){} function f21(a:string, b?:string, c?:number, ...d:number[]){} //// [restParameters.js] -function f18(a) { - var b = []; - for (var _i = 1; _i < arguments.length; _i++) { - b[_i - 1] = arguments[_i]; - } -} -function f19(a, b) { - var c = []; - for (var _i = 2; _i < arguments.length; _i++) { - c[_i - 2] = arguments[_i]; - } -} -function f20(a, b) { - var c = []; - for (var _i = 2; _i < arguments.length; _i++) { - c[_i - 2] = arguments[_i]; - } -} -function f21(a, b, c) { - var d = []; - for (var _i = 3; _i < arguments.length; _i++) { - d[_i - 3] = arguments[_i]; - } -} +function f18(a) { } +function f19(a, b) { } +function f20(a, b) { } +function f21(a, b, c) { } diff --git a/tests/baselines/reference/restParametersOfNonArrayTypes.js b/tests/baselines/reference/restParametersOfNonArrayTypes.js index eee1f6d844a0d..af37ac0e21630 100644 --- a/tests/baselines/reference/restParametersOfNonArrayTypes.js +++ b/tests/baselines/reference/restParametersOfNonArrayTypes.js @@ -27,53 +27,18 @@ var b = { //// [restParametersOfNonArrayTypes.js] // Rest parameters must be an array type if they have a type annotation, so all these are errors -function foo() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -} -var f = function foo() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -}; -var f2 = function () { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } -}; +function foo() { } +var f = function foo() { }; +var f2 = function () { }; var C = /** @class */ (function () { function C() { } - C.prototype.foo = function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - }; + C.prototype.foo = function () { }; return C; }()); var a; var b = { - foo: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - }, - a: function foo() { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } - }, - b: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - } + foo: function () { }, + a: function foo() { }, + b: function () { } }; diff --git a/tests/baselines/reference/restParametersOfNonArrayTypes2.js b/tests/baselines/reference/restParametersOfNonArrayTypes2.js index dc0527aa67a98..3e3e6cacc309d 100644 --- a/tests/baselines/reference/restParametersOfNonArrayTypes2.js +++ b/tests/baselines/reference/restParametersOfNonArrayTypes2.js @@ -59,103 +59,33 @@ var b2 = { //// [restParametersOfNonArrayTypes2.js] // Rest parameters must be an array type if they have a type annotation, // user defined subtypes of array do not count, all of these are errors -function foo() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -} -var f = function foo() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -}; -var f2 = function () { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } -}; +function foo() { } +var f = function foo() { }; +var f2 = function () { }; var C = /** @class */ (function () { function C() { } - C.prototype.foo = function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - }; + C.prototype.foo = function () { }; return C; }()); var a; var b = { - foo: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - }, - a: function foo() { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } - }, - b: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - } -}; -function foo2() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -} -var f3 = function foo() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -}; -var f4 = function () { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } + foo: function () { }, + a: function foo() { }, + b: function () { } }; +function foo2() { } +var f3 = function foo() { }; +var f4 = function () { }; var C2 = /** @class */ (function () { function C2() { } - C2.prototype.foo = function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - }; + C2.prototype.foo = function () { }; return C2; }()); var a2; var b2 = { - foo: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - }, - a: function foo() { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } - }, - b: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - } + foo: function () { }, + a: function foo() { }, + b: function () { } }; diff --git a/tests/baselines/reference/restParametersWithArrayTypeAnnotations.js b/tests/baselines/reference/restParametersWithArrayTypeAnnotations.js index 4e1f02d6b882e..ae2018ac10009 100644 --- a/tests/baselines/reference/restParametersWithArrayTypeAnnotations.js +++ b/tests/baselines/reference/restParametersWithArrayTypeAnnotations.js @@ -54,103 +54,33 @@ var b2 = { //// [restParametersWithArrayTypeAnnotations.js] // Rest parameters must be an array type if they have a type annotation, errors only for the functions with 2 rest params -function foo() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -} -var f = function foo() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -}; -var f2 = function () { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } -}; +function foo() { } +var f = function foo() { }; +var f2 = function () { }; var C = /** @class */ (function () { function C() { } - C.prototype.foo = function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - }; + C.prototype.foo = function () { }; return C; }()); var a; var b = { - foo: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - }, - a: function foo() { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } - }, - b: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - } -}; -function foo2() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -} -var f3 = function foo() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -}; -var f4 = function () { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } + foo: function () { }, + a: function foo() { }, + b: function () { } }; +function foo2() { } +var f3 = function foo() { }; +var f4 = function () { }; var C2 = /** @class */ (function () { function C2() { } - C2.prototype.foo = function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - }; + C2.prototype.foo = function () { }; return C2; }()); var a2; var b2 = { - foo: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - }, - a: function foo() { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } - }, - b: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - } + foo: function () { }, + a: function foo() { }, + b: function () { } }; diff --git a/tests/baselines/reference/restParamsWithNonRestParams.js b/tests/baselines/reference/restParamsWithNonRestParams.js index 7b16959143a45..b58870f1346d9 100644 --- a/tests/baselines/reference/restParamsWithNonRestParams.js +++ b/tests/baselines/reference/restParamsWithNonRestParams.js @@ -7,24 +7,9 @@ function foo3(a?:string, ...b:number[]){} foo3(); // error but shouldn't be //// [restParamsWithNonRestParams.js] -function foo() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function foo() { } foo(); // ok -function foo2(a) { - var b = []; - for (var _i = 1; _i < arguments.length; _i++) { - b[_i - 1] = arguments[_i]; - } -} +function foo2(a) { } foo2(); // should be an error -function foo3(a) { - var b = []; - for (var _i = 1; _i < arguments.length; _i++) { - b[_i - 1] = arguments[_i]; - } -} +function foo3(a) { } foo3(); // error but shouldn't be diff --git a/tests/baselines/reference/restTuplesFromContextualTypes.js b/tests/baselines/reference/restTuplesFromContextualTypes.js index c09274862b803..db1d4201869ec 100644 --- a/tests/baselines/reference/restTuplesFromContextualTypes.js +++ b/tests/baselines/reference/restTuplesFromContextualTypes.js @@ -109,222 +109,56 @@ var __spreadArrays = (this && this.__spreadArrays) || function () { return r; }; (function (a, b, c) { }).apply(void 0, t1); -(function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -}).apply(void 0, t1); -(function (a) { - var x = []; - for (var _i = 1; _i < arguments.length; _i++) { - x[_i - 1] = arguments[_i]; - } -}).apply(void 0, t1); -(function (a, b) { - var x = []; - for (var _i = 2; _i < arguments.length; _i++) { - x[_i - 2] = arguments[_i]; - } -}).apply(void 0, t1); -(function (a, b, c) { - var x = []; - for (var _i = 3; _i < arguments.length; _i++) { - x[_i - 3] = arguments[_i]; - } -}).apply(void 0, t1); +(function () { }).apply(void 0, t1); +(function (a) { }).apply(void 0, t1); +(function (a, b) { }).apply(void 0, t1); +(function (a, b, c) { }).apply(void 0, t1); +f1(function (a, b, c) { }); +f1(function () { }); +f1(function (a) { }); +f1(function (a, b) { }); f1(function (a, b, c) { }); -f1(function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -}); -f1(function (a) { - var x = []; - for (var _i = 1; _i < arguments.length; _i++) { - x[_i - 1] = arguments[_i]; - } -}); -f1(function (a, b) { - var x = []; - for (var _i = 2; _i < arguments.length; _i++) { - x[_i - 2] = arguments[_i]; - } -}); -f1(function (a, b, c) { - var x = []; - for (var _i = 3; _i < arguments.length; _i++) { - x[_i - 3] = arguments[_i]; - } -}); (function (a, b, c) { }).apply(void 0, t2); -(function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -}).apply(void 0, t2); -(function (a) { - var x = []; - for (var _i = 1; _i < arguments.length; _i++) { - x[_i - 1] = arguments[_i]; - } -}).apply(void 0, t2); -(function (a, b) { - var x = []; - for (var _i = 2; _i < arguments.length; _i++) { - x[_i - 2] = arguments[_i]; - } -}).apply(void 0, t2); -(function (a, b, c) { - var x = []; - for (var _i = 3; _i < arguments.length; _i++) { - x[_i - 3] = arguments[_i]; - } -}).apply(void 0, t2); +(function () { }).apply(void 0, t2); +(function (a) { }).apply(void 0, t2); +(function (a, b) { }).apply(void 0, t2); +(function (a, b, c) { }).apply(void 0, t2); +f2(function (a, b, c) { }); +f2(function () { }); +f2(function (a) { }); +f2(function (a, b) { }); f2(function (a, b, c) { }); -f2(function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -}); -f2(function (a) { - var x = []; - for (var _i = 1; _i < arguments.length; _i++) { - x[_i - 1] = arguments[_i]; - } -}); -f2(function (a, b) { - var x = []; - for (var _i = 2; _i < arguments.length; _i++) { - x[_i - 2] = arguments[_i]; - } -}); -f2(function (a, b, c) { - var x = []; - for (var _i = 3; _i < arguments.length; _i++) { - x[_i - 3] = arguments[_i]; - } -}); (function (a, b, c) { }).apply(void 0, __spreadArrays([1], t3)); -(function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -}).apply(void 0, __spreadArrays([1], t3)); -(function (a) { - var x = []; - for (var _i = 1; _i < arguments.length; _i++) { - x[_i - 1] = arguments[_i]; - } -}).apply(void 0, __spreadArrays([1], t3)); -(function (a, b) { - var x = []; - for (var _i = 2; _i < arguments.length; _i++) { - x[_i - 2] = arguments[_i]; - } -}).apply(void 0, __spreadArrays([1], t3)); -(function (a, b, c) { - var x = []; - for (var _i = 3; _i < arguments.length; _i++) { - x[_i - 3] = arguments[_i]; - } -}).apply(void 0, __spreadArrays([1], t3)); +(function () { }).apply(void 0, __spreadArrays([1], t3)); +(function (a) { }).apply(void 0, __spreadArrays([1], t3)); +(function (a, b) { }).apply(void 0, __spreadArrays([1], t3)); +(function (a, b, c) { }).apply(void 0, __spreadArrays([1], t3)); +f3(function (a, b, c) { }); +f3(function () { }); +f3(function (a) { }); +f3(function (a, b) { }); f3(function (a, b, c) { }); -f3(function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } -}); -f3(function (a) { - var x = []; - for (var _i = 1; _i < arguments.length; _i++) { - x[_i - 1] = arguments[_i]; - } -}); -f3(function (a, b) { - var x = []; - for (var _i = 2; _i < arguments.length; _i++) { - x[_i - 2] = arguments[_i]; - } -}); -f3(function (a, b, c) { - var x = []; - for (var _i = 3; _i < arguments.length; _i++) { - x[_i - 3] = arguments[_i]; - } -}); function f4(t) { - (function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - }).apply(void 0, t); - (function (a) { - var x = []; - for (var _i = 1; _i < arguments.length; _i++) { - x[_i - 1] = arguments[_i]; - } - }).apply(void 0, __spreadArrays([1], t)); - (function (a) { - var x = []; - for (var _i = 1; _i < arguments.length; _i++) { - x[_i - 1] = arguments[_i]; - } - }).apply(void 0, __spreadArrays([1, 2], t)); + (function () { }).apply(void 0, t); + (function (a) { }).apply(void 0, __spreadArrays([1], t)); + (function (a) { }).apply(void 0, __spreadArrays([1, 2], t)); function f(cb) { } - f(function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - }); - f(function (a) { - var x = []; - for (var _i = 1; _i < arguments.length; _i++) { - x[_i - 1] = arguments[_i]; - } - }); - f(function (a, b) { - var x = []; - for (var _i = 2; _i < arguments.length; _i++) { - x[_i - 2] = arguments[_i]; - } - }); + f(function () { }); + f(function (a) { }); + f(function (a, b) { }); } var g0 = f5(function () { return "hello"; }); var g1 = f5(function (x, y) { return 42; }); var g2 = f5(function (x, y) { return 42; }); var g3 = f5(function (x, y) { return x + y; }); -var g4 = f5(function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return true; -}); +var g4 = f5(function () { return true; }); var g5 = pipe(function () { return true; }, function (b) { return 42; }); var g6 = pipe(function (x) { return "hello"; }, function (s) { return s.length; }); var g7 = pipe(function (x, y) { return 42; }, function (x) { return "" + x; }); var g8 = pipe(function (x, y) { return 42; }, function (x) { return "" + x; }); (function foo(a, b) { }.apply(void 0, tuple)); -(function foo() { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i] = arguments[_i]; - } -}(1, '')); -take(function () { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i] = arguments[_i]; - } -}); +(function foo() { }(1, '')); +take(function () { }); var funcUnionTupleNoRest = function (num, strOrErr) { return num; }; diff --git a/tests/baselines/reference/sourceMapValidationClass.js b/tests/baselines/reference/sourceMapValidationClass.js index fe5a714acdc40..5e8ee5620aab5 100644 --- a/tests/baselines/reference/sourceMapValidationClass.js +++ b/tests/baselines/reference/sourceMapValidationClass.js @@ -21,10 +21,6 @@ class Greeter { //// [sourceMapValidationClass.js] var Greeter = /** @class */ (function () { function Greeter(greeting) { - var b = []; - for (var _i = 1; _i < arguments.length; _i++) { - b[_i - 1] = arguments[_i]; - } this.greeting = greeting; this.x1 = 10; } diff --git a/tests/baselines/reference/sourceMapValidationClass.js.map b/tests/baselines/reference/sourceMapValidationClass.js.map index 95ffd06228986..d26678a8644f0 100644 --- a/tests/baselines/reference/sourceMapValidationClass.js.map +++ b/tests/baselines/reference/sourceMapValidationClass.js.map @@ -1,3 +1,3 @@ //// [sourceMapValidationClass.js.map] -{"version":3,"file":"sourceMapValidationClass.js","sourceRoot":"","sources":["sourceMapValidationClass.ts"],"names":[],"mappings":"AAAA;IACI,iBAAmB,QAAgB;QAAE,WAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,0BAAc;;QAAhC,aAAQ,GAAR,QAAQ,CAAQ;QAM3B,OAAE,GAAW,EAAE,CAAC;IALxB,CAAC;IACD,uBAAK,GAAL;QACI,OAAO,MAAM,GAAG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC5C,CAAC;IAGO,oBAAE,GAAV;QACI,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IACD,sBAAI,8BAAS;aAAb;YACI,OAAO,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;aACD,UAAc,SAAiB;YAC3B,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC9B,CAAC;;;OAHA;IAIL,cAAC;AAAD,CAAC,AAjBD,IAiBC"} -//// https://sokra.github.io/source-map-visualization#base64,dmFyIEdyZWV0ZXIgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gR3JlZXRlcihncmVldGluZykgew0KICAgICAgICB2YXIgYiA9IFtdOw0KICAgICAgICBmb3IgKHZhciBfaSA9IDE7IF9pIDwgYXJndW1lbnRzLmxlbmd0aDsgX2krKykgew0KICAgICAgICAgICAgYltfaSAtIDFdID0gYXJndW1lbnRzW19pXTsNCiAgICAgICAgfQ0KICAgICAgICB0aGlzLmdyZWV0aW5nID0gZ3JlZXRpbmc7DQogICAgICAgIHRoaXMueDEgPSAxMDsNCiAgICB9DQogICAgR3JlZXRlci5wcm90b3R5cGUuZ3JlZXQgPSBmdW5jdGlvbiAoKSB7DQogICAgICAgIHJldHVybiAiPGgxPiIgKyB0aGlzLmdyZWV0aW5nICsgIjwvaDE+IjsNCiAgICB9Ow0KICAgIEdyZWV0ZXIucHJvdG90eXBlLmZuID0gZnVuY3Rpb24gKCkgew0KICAgICAgICByZXR1cm4gdGhpcy5ncmVldGluZzsNCiAgICB9Ow0KICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShHcmVldGVyLnByb3RvdHlwZSwgImdyZWV0aW5ncyIsIHsNCiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7DQogICAgICAgICAgICByZXR1cm4gdGhpcy5ncmVldGluZzsNCiAgICAgICAgfSwNCiAgICAgICAgc2V0OiBmdW5jdGlvbiAoZ3JlZXRpbmdzKSB7DQogICAgICAgICAgICB0aGlzLmdyZWV0aW5nID0gZ3JlZXRpbmdzOw0KICAgICAgICB9LA0KICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSwNCiAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlDQogICAgfSk7DQogICAgcmV0dXJuIEdyZWV0ZXI7DQp9KCkpOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9c291cmNlTWFwVmFsaWRhdGlvbkNsYXNzLmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlTWFwVmFsaWRhdGlvbkNsYXNzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic291cmNlTWFwVmFsaWRhdGlvbkNsYXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0lBQ0ksaUJBQW1CLFFBQWdCO1FBQUUsV0FBYzthQUFkLFVBQWMsRUFBZCxxQkFBYyxFQUFkLElBQWM7WUFBZCwwQkFBYzs7UUFBaEMsYUFBUSxHQUFSLFFBQVEsQ0FBUTtRQU0zQixPQUFFLEdBQVcsRUFBRSxDQUFDO0lBTHhCLENBQUM7SUFDRCx1QkFBSyxHQUFMO1FBQ0ksT0FBTyxNQUFNLEdBQUcsSUFBSSxDQUFDLFFBQVEsR0FBRyxPQUFPLENBQUM7SUFDNUMsQ0FBQztJQUdPLG9CQUFFLEdBQVY7UUFDSSxPQUFPLElBQUksQ0FBQyxRQUFRLENBQUM7SUFDekIsQ0FBQztJQUNELHNCQUFJLDhCQUFTO2FBQWI7WUFDSSxPQUFPLElBQUksQ0FBQyxRQUFRLENBQUM7UUFDekIsQ0FBQzthQUNELFVBQWMsU0FBaUI7WUFDM0IsSUFBSSxDQUFDLFFBQVEsR0FBRyxTQUFTLENBQUM7UUFDOUIsQ0FBQzs7O09BSEE7SUFJTCxjQUFDO0FBQUQsQ0FBQyxBQWpCRCxJQWlCQyJ9,Y2xhc3MgR3JlZXRlciB7CiAgICBjb25zdHJ1Y3RvcihwdWJsaWMgZ3JlZXRpbmc6IHN0cmluZywgLi4uYjogc3RyaW5nW10pIHsKICAgIH0KICAgIGdyZWV0KCkgewogICAgICAgIHJldHVybiAiPGgxPiIgKyB0aGlzLmdyZWV0aW5nICsgIjwvaDE+IjsKICAgIH0KICAgIHByaXZhdGUgeDogc3RyaW5nOwogICAgcHJpdmF0ZSB4MTogbnVtYmVyID0gMTA7CiAgICBwcml2YXRlIGZuKCkgewogICAgICAgIHJldHVybiB0aGlzLmdyZWV0aW5nOwogICAgfQogICAgZ2V0IGdyZWV0aW5ncygpIHsKICAgICAgICByZXR1cm4gdGhpcy5ncmVldGluZzsKICAgIH0KICAgIHNldCBncmVldGluZ3MoZ3JlZXRpbmdzOiBzdHJpbmcpIHsKICAgICAgICB0aGlzLmdyZWV0aW5nID0gZ3JlZXRpbmdzOwogICAgfQp9 +{"version":3,"file":"sourceMapValidationClass.js","sourceRoot":"","sources":["sourceMapValidationClass.ts"],"names":[],"mappings":"AAAA;IACI,iBAAmB,QAAgB;QAAhB,aAAQ,GAAR,QAAQ,CAAQ;QAM3B,OAAE,GAAW,EAAE,CAAC;IALxB,CAAC;IACD,uBAAK,GAAL;QACI,OAAO,MAAM,GAAG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC5C,CAAC;IAGO,oBAAE,GAAV;QACI,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IACD,sBAAI,8BAAS;aAAb;YACI,OAAO,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;aACD,UAAc,SAAiB;YAC3B,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC9B,CAAC;;;OAHA;IAIL,cAAC;AAAD,CAAC,AAjBD,IAiBC"} +//// https://sokra.github.io/source-map-visualization#base64,dmFyIEdyZWV0ZXIgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gR3JlZXRlcihncmVldGluZykgew0KICAgICAgICB0aGlzLmdyZWV0aW5nID0gZ3JlZXRpbmc7DQogICAgICAgIHRoaXMueDEgPSAxMDsNCiAgICB9DQogICAgR3JlZXRlci5wcm90b3R5cGUuZ3JlZXQgPSBmdW5jdGlvbiAoKSB7DQogICAgICAgIHJldHVybiAiPGgxPiIgKyB0aGlzLmdyZWV0aW5nICsgIjwvaDE+IjsNCiAgICB9Ow0KICAgIEdyZWV0ZXIucHJvdG90eXBlLmZuID0gZnVuY3Rpb24gKCkgew0KICAgICAgICByZXR1cm4gdGhpcy5ncmVldGluZzsNCiAgICB9Ow0KICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShHcmVldGVyLnByb3RvdHlwZSwgImdyZWV0aW5ncyIsIHsNCiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7DQogICAgICAgICAgICByZXR1cm4gdGhpcy5ncmVldGluZzsNCiAgICAgICAgfSwNCiAgICAgICAgc2V0OiBmdW5jdGlvbiAoZ3JlZXRpbmdzKSB7DQogICAgICAgICAgICB0aGlzLmdyZWV0aW5nID0gZ3JlZXRpbmdzOw0KICAgICAgICB9LA0KICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSwNCiAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlDQogICAgfSk7DQogICAgcmV0dXJuIEdyZWV0ZXI7DQp9KCkpOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9c291cmNlTWFwVmFsaWRhdGlvbkNsYXNzLmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlTWFwVmFsaWRhdGlvbkNsYXNzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic291cmNlTWFwVmFsaWRhdGlvbkNsYXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0lBQ0ksaUJBQW1CLFFBQWdCO1FBQWhCLGFBQVEsR0FBUixRQUFRLENBQVE7UUFNM0IsT0FBRSxHQUFXLEVBQUUsQ0FBQztJQUx4QixDQUFDO0lBQ0QsdUJBQUssR0FBTDtRQUNJLE9BQU8sTUFBTSxHQUFHLElBQUksQ0FBQyxRQUFRLEdBQUcsT0FBTyxDQUFDO0lBQzVDLENBQUM7SUFHTyxvQkFBRSxHQUFWO1FBQ0ksT0FBTyxJQUFJLENBQUMsUUFBUSxDQUFDO0lBQ3pCLENBQUM7SUFDRCxzQkFBSSw4QkFBUzthQUFiO1lBQ0ksT0FBTyxJQUFJLENBQUMsUUFBUSxDQUFDO1FBQ3pCLENBQUM7YUFDRCxVQUFjLFNBQWlCO1lBQzNCLElBQUksQ0FBQyxRQUFRLEdBQUcsU0FBUyxDQUFDO1FBQzlCLENBQUM7OztPQUhBO0lBSUwsY0FBQztBQUFELENBQUMsQUFqQkQsSUFpQkMifQ==,Y2xhc3MgR3JlZXRlciB7CiAgICBjb25zdHJ1Y3RvcihwdWJsaWMgZ3JlZXRpbmc6IHN0cmluZywgLi4uYjogc3RyaW5nW10pIHsKICAgIH0KICAgIGdyZWV0KCkgewogICAgICAgIHJldHVybiAiPGgxPiIgKyB0aGlzLmdyZWV0aW5nICsgIjwvaDE+IjsKICAgIH0KICAgIHByaXZhdGUgeDogc3RyaW5nOwogICAgcHJpdmF0ZSB4MTogbnVtYmVyID0gMTA7CiAgICBwcml2YXRlIGZuKCkgewogICAgICAgIHJldHVybiB0aGlzLmdyZWV0aW5nOwogICAgfQogICAgZ2V0IGdyZWV0aW5ncygpIHsKICAgICAgICByZXR1cm4gdGhpcy5ncmVldGluZzsKICAgIH0KICAgIHNldCBncmVldGluZ3MoZ3JlZXRpbmdzOiBzdHJpbmcpIHsKICAgICAgICB0aGlzLmdyZWV0aW5nID0gZ3JlZXRpbmdzOwogICAgfQp9 diff --git a/tests/baselines/reference/sourceMapValidationClass.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClass.sourcemap.txt index 00e9a0da75dde..a1ef1d84b2784 100644 --- a/tests/baselines/reference/sourceMapValidationClass.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClass.sourcemap.txt @@ -18,6 +18,7 @@ sourceFile:sourceMapValidationClass.ts 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^ +4 > ^^^^^-> 1->class Greeter { > 2 > constructor(public @@ -26,60 +27,22 @@ sourceFile:sourceMapValidationClass.ts 2 >Emitted(2, 22) Source(2, 24) + SourceIndex(0) 3 >Emitted(2, 30) Source(2, 40) + SourceIndex(0) --- ->>> var b = []; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >, -2 > ...b: string[] -1 >Emitted(3, 9) Source(2, 42) + SourceIndex(0) -2 >Emitted(3, 20) Source(2, 56) + SourceIndex(0) ---- ->>> for (var _i = 1; _i < arguments.length; _i++) { -1->^^^^^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: string[] -3 > -4 > ...b: string[] -5 > -6 > ...b: string[] -1->Emitted(4, 14) Source(2, 42) + SourceIndex(0) -2 >Emitted(4, 24) Source(2, 56) + SourceIndex(0) -3 >Emitted(4, 26) Source(2, 42) + SourceIndex(0) -4 >Emitted(4, 47) Source(2, 56) + SourceIndex(0) -5 >Emitted(4, 49) Source(2, 42) + SourceIndex(0) -6 >Emitted(4, 53) Source(2, 56) + SourceIndex(0) ---- ->>> b[_i - 1] = arguments[_i]; -1 >^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: string[] -1 >Emitted(5, 13) Source(2, 42) + SourceIndex(0) -2 >Emitted(5, 39) Source(2, 56) + SourceIndex(0) ---- ->>> } >>> this.greeting = greeting; -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^^^^^^^^^^^^^ 3 > ^^^ 4 > ^^^^^^^^ 5 > ^ -1 > +1-> 2 > greeting 3 > 4 > greeting 5 > : string -1 >Emitted(7, 9) Source(2, 24) + SourceIndex(0) -2 >Emitted(7, 22) Source(2, 32) + SourceIndex(0) -3 >Emitted(7, 25) Source(2, 24) + SourceIndex(0) -4 >Emitted(7, 33) Source(2, 32) + SourceIndex(0) -5 >Emitted(7, 34) Source(2, 40) + SourceIndex(0) +1->Emitted(3, 9) Source(2, 24) + SourceIndex(0) +2 >Emitted(3, 22) Source(2, 32) + SourceIndex(0) +3 >Emitted(3, 25) Source(2, 24) + SourceIndex(0) +4 >Emitted(3, 33) Source(2, 32) + SourceIndex(0) +5 >Emitted(3, 34) Source(2, 40) + SourceIndex(0) --- >>> this.x1 = 10; 1 >^^^^^^^^ @@ -98,11 +61,11 @@ sourceFile:sourceMapValidationClass.ts 3 > : number = 4 > 10 5 > ; -1 >Emitted(8, 9) Source(8, 13) + SourceIndex(0) -2 >Emitted(8, 16) Source(8, 15) + SourceIndex(0) -3 >Emitted(8, 19) Source(8, 26) + SourceIndex(0) -4 >Emitted(8, 21) Source(8, 28) + SourceIndex(0) -5 >Emitted(8, 22) Source(8, 29) + SourceIndex(0) +1 >Emitted(4, 9) Source(8, 13) + SourceIndex(0) +2 >Emitted(4, 16) Source(8, 15) + SourceIndex(0) +3 >Emitted(4, 19) Source(8, 26) + SourceIndex(0) +4 >Emitted(4, 21) Source(8, 28) + SourceIndex(0) +5 >Emitted(4, 22) Source(8, 29) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -110,8 +73,8 @@ sourceFile:sourceMapValidationClass.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 2 > } -1 >Emitted(9, 5) Source(3, 5) + SourceIndex(0) -2 >Emitted(9, 6) Source(3, 6) + SourceIndex(0) +1 >Emitted(5, 5) Source(3, 5) + SourceIndex(0) +2 >Emitted(5, 6) Source(3, 6) + SourceIndex(0) --- >>> Greeter.prototype.greet = function () { 1->^^^^ @@ -122,9 +85,9 @@ sourceFile:sourceMapValidationClass.ts > 2 > greet 3 > -1->Emitted(10, 5) Source(4, 5) + SourceIndex(0) -2 >Emitted(10, 28) Source(4, 10) + SourceIndex(0) -3 >Emitted(10, 31) Source(4, 5) + SourceIndex(0) +1->Emitted(6, 5) Source(4, 5) + SourceIndex(0) +2 >Emitted(6, 28) Source(4, 10) + SourceIndex(0) +3 >Emitted(6, 31) Source(4, 5) + SourceIndex(0) --- >>> return "

" + this.greeting + "

"; 1->^^^^^^^^ @@ -148,16 +111,16 @@ sourceFile:sourceMapValidationClass.ts 8 > + 9 > "" 10> ; -1->Emitted(11, 9) Source(5, 9) + SourceIndex(0) -2 >Emitted(11, 16) Source(5, 16) + SourceIndex(0) -3 >Emitted(11, 22) Source(5, 22) + SourceIndex(0) -4 >Emitted(11, 25) Source(5, 25) + SourceIndex(0) -5 >Emitted(11, 29) Source(5, 29) + SourceIndex(0) -6 >Emitted(11, 30) Source(5, 30) + SourceIndex(0) -7 >Emitted(11, 38) Source(5, 38) + SourceIndex(0) -8 >Emitted(11, 41) Source(5, 41) + SourceIndex(0) -9 >Emitted(11, 48) Source(5, 48) + SourceIndex(0) -10>Emitted(11, 49) Source(5, 49) + SourceIndex(0) +1->Emitted(7, 9) Source(5, 9) + SourceIndex(0) +2 >Emitted(7, 16) Source(5, 16) + SourceIndex(0) +3 >Emitted(7, 22) Source(5, 22) + SourceIndex(0) +4 >Emitted(7, 25) Source(5, 25) + SourceIndex(0) +5 >Emitted(7, 29) Source(5, 29) + SourceIndex(0) +6 >Emitted(7, 30) Source(5, 30) + SourceIndex(0) +7 >Emitted(7, 38) Source(5, 38) + SourceIndex(0) +8 >Emitted(7, 41) Source(5, 41) + SourceIndex(0) +9 >Emitted(7, 48) Source(5, 48) + SourceIndex(0) +10>Emitted(7, 49) Source(5, 49) + SourceIndex(0) --- >>> }; 1 >^^^^ @@ -166,8 +129,8 @@ sourceFile:sourceMapValidationClass.ts 1 > > 2 > } -1 >Emitted(12, 5) Source(6, 5) + SourceIndex(0) -2 >Emitted(12, 6) Source(6, 6) + SourceIndex(0) +1 >Emitted(8, 5) Source(6, 5) + SourceIndex(0) +2 >Emitted(8, 6) Source(6, 6) + SourceIndex(0) --- >>> Greeter.prototype.fn = function () { 1->^^^^ @@ -180,9 +143,9 @@ sourceFile:sourceMapValidationClass.ts > private 2 > fn 3 > -1->Emitted(13, 5) Source(9, 13) + SourceIndex(0) -2 >Emitted(13, 25) Source(9, 15) + SourceIndex(0) -3 >Emitted(13, 28) Source(9, 5) + SourceIndex(0) +1->Emitted(9, 5) Source(9, 13) + SourceIndex(0) +2 >Emitted(9, 25) Source(9, 15) + SourceIndex(0) +3 >Emitted(9, 28) Source(9, 5) + SourceIndex(0) --- >>> return this.greeting; 1->^^^^^^^^ @@ -198,12 +161,12 @@ sourceFile:sourceMapValidationClass.ts 4 > . 5 > greeting 6 > ; -1->Emitted(14, 9) Source(10, 9) + SourceIndex(0) -2 >Emitted(14, 16) Source(10, 16) + SourceIndex(0) -3 >Emitted(14, 20) Source(10, 20) + SourceIndex(0) -4 >Emitted(14, 21) Source(10, 21) + SourceIndex(0) -5 >Emitted(14, 29) Source(10, 29) + SourceIndex(0) -6 >Emitted(14, 30) Source(10, 30) + SourceIndex(0) +1->Emitted(10, 9) Source(10, 9) + SourceIndex(0) +2 >Emitted(10, 16) Source(10, 16) + SourceIndex(0) +3 >Emitted(10, 20) Source(10, 20) + SourceIndex(0) +4 >Emitted(10, 21) Source(10, 21) + SourceIndex(0) +5 >Emitted(10, 29) Source(10, 29) + SourceIndex(0) +6 >Emitted(10, 30) Source(10, 30) + SourceIndex(0) --- >>> }; 1 >^^^^ @@ -212,8 +175,8 @@ sourceFile:sourceMapValidationClass.ts 1 > > 2 > } -1 >Emitted(15, 5) Source(11, 5) + SourceIndex(0) -2 >Emitted(15, 6) Source(11, 6) + SourceIndex(0) +1 >Emitted(11, 5) Source(11, 5) + SourceIndex(0) +2 >Emitted(11, 6) Source(11, 6) + SourceIndex(0) --- >>> Object.defineProperty(Greeter.prototype, "greetings", { 1->^^^^ @@ -223,15 +186,15 @@ sourceFile:sourceMapValidationClass.ts > 2 > get 3 > greetings -1->Emitted(16, 5) Source(12, 5) + SourceIndex(0) -2 >Emitted(16, 27) Source(12, 9) + SourceIndex(0) -3 >Emitted(16, 57) Source(12, 18) + SourceIndex(0) +1->Emitted(12, 5) Source(12, 5) + SourceIndex(0) +2 >Emitted(12, 27) Source(12, 9) + SourceIndex(0) +3 >Emitted(12, 57) Source(12, 18) + SourceIndex(0) --- >>> get: function () { 1 >^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(17, 14) Source(12, 5) + SourceIndex(0) +1 >Emitted(13, 14) Source(12, 5) + SourceIndex(0) --- >>> return this.greeting; 1->^^^^^^^^^^^^ @@ -247,12 +210,12 @@ sourceFile:sourceMapValidationClass.ts 4 > . 5 > greeting 6 > ; -1->Emitted(18, 13) Source(13, 9) + SourceIndex(0) -2 >Emitted(18, 20) Source(13, 16) + SourceIndex(0) -3 >Emitted(18, 24) Source(13, 20) + SourceIndex(0) -4 >Emitted(18, 25) Source(13, 21) + SourceIndex(0) -5 >Emitted(18, 33) Source(13, 29) + SourceIndex(0) -6 >Emitted(18, 34) Source(13, 30) + SourceIndex(0) +1->Emitted(14, 13) Source(13, 9) + SourceIndex(0) +2 >Emitted(14, 20) Source(13, 16) + SourceIndex(0) +3 >Emitted(14, 24) Source(13, 20) + SourceIndex(0) +4 >Emitted(14, 25) Source(13, 21) + SourceIndex(0) +5 >Emitted(14, 33) Source(13, 29) + SourceIndex(0) +6 >Emitted(14, 34) Source(13, 30) + SourceIndex(0) --- >>> }, 1 >^^^^^^^^ @@ -261,8 +224,8 @@ sourceFile:sourceMapValidationClass.ts 1 > > 2 > } -1 >Emitted(19, 9) Source(14, 5) + SourceIndex(0) -2 >Emitted(19, 10) Source(14, 6) + SourceIndex(0) +1 >Emitted(15, 9) Source(14, 5) + SourceIndex(0) +2 >Emitted(15, 10) Source(14, 6) + SourceIndex(0) --- >>> set: function (greetings) { 1->^^^^^^^^^^^^^ @@ -273,9 +236,9 @@ sourceFile:sourceMapValidationClass.ts > 2 > set greetings( 3 > greetings: string -1->Emitted(20, 14) Source(15, 5) + SourceIndex(0) -2 >Emitted(20, 24) Source(15, 19) + SourceIndex(0) -3 >Emitted(20, 33) Source(15, 36) + SourceIndex(0) +1->Emitted(16, 14) Source(15, 5) + SourceIndex(0) +2 >Emitted(16, 24) Source(15, 19) + SourceIndex(0) +3 >Emitted(16, 33) Source(15, 36) + SourceIndex(0) --- >>> this.greeting = greetings; 1->^^^^^^^^^^^^ @@ -293,13 +256,13 @@ sourceFile:sourceMapValidationClass.ts 5 > = 6 > greetings 7 > ; -1->Emitted(21, 13) Source(16, 9) + SourceIndex(0) -2 >Emitted(21, 17) Source(16, 13) + SourceIndex(0) -3 >Emitted(21, 18) Source(16, 14) + SourceIndex(0) -4 >Emitted(21, 26) Source(16, 22) + SourceIndex(0) -5 >Emitted(21, 29) Source(16, 25) + SourceIndex(0) -6 >Emitted(21, 38) Source(16, 34) + SourceIndex(0) -7 >Emitted(21, 39) Source(16, 35) + SourceIndex(0) +1->Emitted(17, 13) Source(16, 9) + SourceIndex(0) +2 >Emitted(17, 17) Source(16, 13) + SourceIndex(0) +3 >Emitted(17, 18) Source(16, 14) + SourceIndex(0) +4 >Emitted(17, 26) Source(16, 22) + SourceIndex(0) +5 >Emitted(17, 29) Source(16, 25) + SourceIndex(0) +6 >Emitted(17, 38) Source(16, 34) + SourceIndex(0) +7 >Emitted(17, 39) Source(16, 35) + SourceIndex(0) --- >>> }, 1 >^^^^^^^^ @@ -308,8 +271,8 @@ sourceFile:sourceMapValidationClass.ts 1 > > 2 > } -1 >Emitted(22, 9) Source(17, 5) + SourceIndex(0) -2 >Emitted(22, 10) Source(17, 6) + SourceIndex(0) +1 >Emitted(18, 9) Source(17, 5) + SourceIndex(0) +2 >Emitted(18, 10) Source(17, 6) + SourceIndex(0) --- >>> enumerable: false, >>> configurable: true @@ -317,7 +280,7 @@ sourceFile:sourceMapValidationClass.ts 1->^^^^^^^ 2 > ^^^^^^^^^^^^^-> 1-> -1->Emitted(25, 8) Source(14, 6) + SourceIndex(0) +1->Emitted(21, 8) Source(14, 6) + SourceIndex(0) --- >>> return Greeter; 1->^^^^ @@ -328,8 +291,8 @@ sourceFile:sourceMapValidationClass.ts > } > 2 > } -1->Emitted(26, 5) Source(18, 1) + SourceIndex(0) -2 >Emitted(26, 19) Source(18, 2) + SourceIndex(0) +1->Emitted(22, 5) Source(18, 1) + SourceIndex(0) +2 >Emitted(22, 19) Source(18, 2) + SourceIndex(0) --- >>>}()); 1 > @@ -358,9 +321,9 @@ sourceFile:sourceMapValidationClass.ts > this.greeting = greetings; > } > } -1 >Emitted(27, 1) Source(18, 1) + SourceIndex(0) -2 >Emitted(27, 2) Source(18, 2) + SourceIndex(0) -3 >Emitted(27, 2) Source(1, 1) + SourceIndex(0) -4 >Emitted(27, 6) Source(18, 2) + SourceIndex(0) +1 >Emitted(23, 1) Source(18, 1) + SourceIndex(0) +2 >Emitted(23, 2) Source(18, 2) + SourceIndex(0) +3 >Emitted(23, 2) Source(1, 1) + SourceIndex(0) +4 >Emitted(23, 6) Source(18, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationClass.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDecorators.js b/tests/baselines/reference/sourceMapValidationDecorators.js index 86a843f7f82c3..905c562b402c6 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.js +++ b/tests/baselines/reference/sourceMapValidationDecorators.js @@ -66,10 +66,6 @@ var __param = (this && this.__param) || function (paramIndex, decorator) { }; var Greeter = /** @class */ (function () { function Greeter(greeting) { - var b = []; - for (var _i = 1; _i < arguments.length; _i++) { - b[_i - 1] = arguments[_i]; - } this.greeting = greeting; } Greeter.prototype.greet = function () { diff --git a/tests/baselines/reference/sourceMapValidationDecorators.js.map b/tests/baselines/reference/sourceMapValidationDecorators.js.map index 5b5471bc7bf62..6b0df4bb8fdc0 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.js.map +++ b/tests/baselines/reference/sourceMapValidationDecorators.js.map @@ -1,3 +1,3 @@ //// [sourceMapValidationDecorators.js.map] -{"version":3,"file":"sourceMapValidationDecorators.js","sourceRoot":"","sources":["sourceMapValidationDecorators.ts"],"names":[],"mappings":";;;;;;;;;AASA;IACI,iBAGS,QAAgB;QAIvB,WAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,0BAAc;;QAJP,aAAQ,GAAR,QAAQ,CAAQ;IAKzB,CAAC;IAID,uBAAK,GAAL;QACI,OAAO,MAAM,GAAG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC5C,CAAC;IAUO,oBAAE,GAAV,UAGE,CAAS;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAID,sBAAI,8BAAS;aAAb;YACI,OAAO,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;aAED,UAGE,SAAiB;YACf,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC9B,CAAC;;;OAPA;IAbc,UAAE,GAAW,EAAE,CAAC;IAV/B;QAFC,kBAAkB;QAClB,kBAAkB,CAAC,EAAE,CAAC;wCAGtB;IAID;QAFC,kBAAkB;QAClB,kBAAkB,CAAC,EAAE,CAAC;sCACL;IAMlB;QACG,WAAA,mBAAmB,CAAA;QACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;qCAGzB;IAID;QAFC,kBAAkB;QAClB,kBAAkB,CAAC,EAAE,CAAC;QAMpB,WAAA,mBAAmB,CAAA;QACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;4CAJzB;IAbD;QAFC,kBAAkB;QAClB,kBAAkB,CAAC,EAAE,CAAC;6BACQ;IAvB7B,OAAO;QAFZ,eAAe;QACf,eAAe,CAAC,EAAE,CAAC;QAGb,WAAA,mBAAmB,CAAA;QACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;QAGvB,WAAA,mBAAmB,CAAA;QACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;OAPxB,OAAO,CA4CZ;IAAD,cAAC;CAAA,AA5CD,IA4CC"} -//// https://sokra.github.io/source-map-visualization#base64,dmFyIF9fZGVjb3JhdGUgPSAodGhpcyAmJiB0aGlzLl9fZGVjb3JhdGUpIHx8IGZ1bmN0aW9uIChkZWNvcmF0b3JzLCB0YXJnZXQsIGtleSwgZGVzYykgew0KICAgIHZhciBjID0gYXJndW1lbnRzLmxlbmd0aCwgciA9IGMgPCAzID8gdGFyZ2V0IDogZGVzYyA9PT0gbnVsbCA/IGRlc2MgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKHRhcmdldCwga2V5KSA6IGRlc2MsIGQ7DQogICAgaWYgKHR5cGVvZiBSZWZsZWN0ID09PSAib2JqZWN0IiAmJiB0eXBlb2YgUmVmbGVjdC5kZWNvcmF0ZSA9PT0gImZ1bmN0aW9uIikgciA9IFJlZmxlY3QuZGVjb3JhdGUoZGVjb3JhdG9ycywgdGFyZ2V0LCBrZXksIGRlc2MpOw0KICAgIGVsc2UgZm9yICh2YXIgaSA9IGRlY29yYXRvcnMubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIGlmIChkID0gZGVjb3JhdG9yc1tpXSkgciA9IChjIDwgMyA/IGQocikgOiBjID4gMyA/IGQodGFyZ2V0LCBrZXksIHIpIDogZCh0YXJnZXQsIGtleSkpIHx8IHI7DQogICAgcmV0dXJuIGMgPiAzICYmIHIgJiYgT2JqZWN0LmRlZmluZVByb3BlcnR5KHRhcmdldCwga2V5LCByKSwgcjsNCn07DQp2YXIgX19wYXJhbSA9ICh0aGlzICYmIHRoaXMuX19wYXJhbSkgfHwgZnVuY3Rpb24gKHBhcmFtSW5kZXgsIGRlY29yYXRvcikgew0KICAgIHJldHVybiBmdW5jdGlvbiAodGFyZ2V0LCBrZXkpIHsgZGVjb3JhdG9yKHRhcmdldCwga2V5LCBwYXJhbUluZGV4KTsgfQ0KfTsNCnZhciBHcmVldGVyID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKCkgew0KICAgIGZ1bmN0aW9uIEdyZWV0ZXIoZ3JlZXRpbmcpIHsNCiAgICAgICAgdmFyIGIgPSBbXTsNCiAgICAgICAgZm9yICh2YXIgX2kgPSAxOyBfaSA8IGFyZ3VtZW50cy5sZW5ndGg7IF9pKyspIHsNCiAgICAgICAgICAgIGJbX2kgLSAxXSA9IGFyZ3VtZW50c1tfaV07DQogICAgICAgIH0NCiAgICAgICAgdGhpcy5ncmVldGluZyA9IGdyZWV0aW5nOw0KICAgIH0NCiAgICBHcmVldGVyLnByb3RvdHlwZS5ncmVldCA9IGZ1bmN0aW9uICgpIHsNCiAgICAgICAgcmV0dXJuICI8aDE+IiArIHRoaXMuZ3JlZXRpbmcgKyAiPC9oMT4iOw0KICAgIH07DQogICAgR3JlZXRlci5wcm90b3R5cGUuZm4gPSBmdW5jdGlvbiAoeCkgew0KICAgICAgICByZXR1cm4gdGhpcy5ncmVldGluZzsNCiAgICB9Ow0KICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShHcmVldGVyLnByb3RvdHlwZSwgImdyZWV0aW5ncyIsIHsNCiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7DQogICAgICAgICAgICByZXR1cm4gdGhpcy5ncmVldGluZzsNCiAgICAgICAgfSwNCiAgICAgICAgc2V0OiBmdW5jdGlvbiAoZ3JlZXRpbmdzKSB7DQogICAgICAgICAgICB0aGlzLmdyZWV0aW5nID0gZ3JlZXRpbmdzOw0KICAgICAgICB9LA0KICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSwNCiAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlDQogICAgfSk7DQogICAgR3JlZXRlci54MSA9IDEwOw0KICAgIF9fZGVjb3JhdGUoWw0KICAgICAgICBQcm9wZXJ0eURlY29yYXRvcjEsDQogICAgICAgIFByb3BlcnR5RGVjb3JhdG9yMig0MCkNCiAgICBdLCBHcmVldGVyLnByb3RvdHlwZSwgImdyZWV0IiwgbnVsbCk7DQogICAgX19kZWNvcmF0ZShbDQogICAgICAgIFByb3BlcnR5RGVjb3JhdG9yMSwNCiAgICAgICAgUHJvcGVydHlEZWNvcmF0b3IyKDUwKQ0KICAgIF0sIEdyZWV0ZXIucHJvdG90eXBlLCAieCIsIHZvaWQgMCk7DQogICAgX19kZWNvcmF0ZShbDQogICAgICAgIF9fcGFyYW0oMCwgUGFyYW1ldGVyRGVjb3JhdG9yMSksDQogICAgICAgIF9fcGFyYW0oMCwgUGFyYW1ldGVyRGVjb3JhdG9yMig3MCkpDQogICAgXSwgR3JlZXRlci5wcm90b3R5cGUsICJmbiIsIG51bGwpOw0KICAgIF9fZGVjb3JhdGUoWw0KICAgICAgICBQcm9wZXJ0eURlY29yYXRvcjEsDQogICAgICAgIFByb3BlcnR5RGVjb3JhdG9yMig4MCksDQogICAgICAgIF9fcGFyYW0oMCwgUGFyYW1ldGVyRGVjb3JhdG9yMSksDQogICAgICAgIF9fcGFyYW0oMCwgUGFyYW1ldGVyRGVjb3JhdG9yMig5MCkpDQogICAgXSwgR3JlZXRlci5wcm90b3R5cGUsICJncmVldGluZ3MiLCBudWxsKTsNCiAgICBfX2RlY29yYXRlKFsNCiAgICAgICAgUHJvcGVydHlEZWNvcmF0b3IxLA0KICAgICAgICBQcm9wZXJ0eURlY29yYXRvcjIoNjApDQogICAgXSwgR3JlZXRlciwgIngxIiwgdm9pZCAwKTsNCiAgICBHcmVldGVyID0gX19kZWNvcmF0ZShbDQogICAgICAgIENsYXNzRGVjb3JhdG9yMSwNCiAgICAgICAgQ2xhc3NEZWNvcmF0b3IyKDEwKSwNCiAgICAgICAgX19wYXJhbSgwLCBQYXJhbWV0ZXJEZWNvcmF0b3IxKSwNCiAgICAgICAgX19wYXJhbSgwLCBQYXJhbWV0ZXJEZWNvcmF0b3IyKDIwKSksDQogICAgICAgIF9fcGFyYW0oMSwgUGFyYW1ldGVyRGVjb3JhdG9yMSksDQogICAgICAgIF9fcGFyYW0oMSwgUGFyYW1ldGVyRGVjb3JhdG9yMigzMCkpDQogICAgXSwgR3JlZXRlcik7DQogICAgcmV0dXJuIEdyZWV0ZXI7DQp9KCkpOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9c291cmNlTWFwVmFsaWRhdGlvbkRlY29yYXRvcnMuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlTWFwVmFsaWRhdGlvbkRlY29yYXRvcnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJzb3VyY2VNYXBWYWxpZGF0aW9uRGVjb3JhdG9ycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFTQTtJQUNJLGlCQUdTLFFBQWdCO1FBSXZCLFdBQWM7YUFBZCxVQUFjLEVBQWQscUJBQWMsRUFBZCxJQUFjO1lBQWQsMEJBQWM7O1FBSlAsYUFBUSxHQUFSLFFBQVEsQ0FBUTtJQUt6QixDQUFDO0lBSUQsdUJBQUssR0FBTDtRQUNJLE9BQU8sTUFBTSxHQUFHLElBQUksQ0FBQyxRQUFRLEdBQUcsT0FBTyxDQUFDO0lBQzVDLENBQUM7SUFVTyxvQkFBRSxHQUFWLFVBR0UsQ0FBUztRQUNQLE9BQU8sSUFBSSxDQUFDLFFBQVEsQ0FBQztJQUN6QixDQUFDO0lBSUQsc0JBQUksOEJBQVM7YUFBYjtZQUNJLE9BQU8sSUFBSSxDQUFDLFFBQVEsQ0FBQztRQUN6QixDQUFDO2FBRUQsVUFHRSxTQUFpQjtZQUNmLElBQUksQ0FBQyxRQUFRLEdBQUcsU0FBUyxDQUFDO1FBQzlCLENBQUM7OztPQVBBO0lBYmMsVUFBRSxHQUFXLEVBQUUsQ0FBQztJQVYvQjtRQUZDLGtCQUFrQjtRQUNsQixrQkFBa0IsQ0FBQyxFQUFFLENBQUM7d0NBR3RCO0lBSUQ7UUFGQyxrQkFBa0I7UUFDbEIsa0JBQWtCLENBQUMsRUFBRSxDQUFDO3NDQUNMO0lBTWxCO1FBQ0csV0FBQSxtQkFBbUIsQ0FBQTtRQUNuQixXQUFBLG1CQUFtQixDQUFDLEVBQUUsQ0FBQyxDQUFBO3FDQUd6QjtJQUlEO1FBRkMsa0JBQWtCO1FBQ2xCLGtCQUFrQixDQUFDLEVBQUUsQ0FBQztRQU1wQixXQUFBLG1CQUFtQixDQUFBO1FBQ25CLFdBQUEsbUJBQW1CLENBQUMsRUFBRSxDQUFDLENBQUE7NENBSnpCO0lBYkQ7UUFGQyxrQkFBa0I7UUFDbEIsa0JBQWtCLENBQUMsRUFBRSxDQUFDOzZCQUNRO0lBdkI3QixPQUFPO1FBRlosZUFBZTtRQUNmLGVBQWUsQ0FBQyxFQUFFLENBQUM7UUFHYixXQUFBLG1CQUFtQixDQUFBO1FBQ25CLFdBQUEsbUJBQW1CLENBQUMsRUFBRSxDQUFDLENBQUE7UUFHdkIsV0FBQSxtQkFBbUIsQ0FBQTtRQUNuQixXQUFBLG1CQUFtQixDQUFDLEVBQUUsQ0FBQyxDQUFBO09BUHhCLE9BQU8sQ0E0Q1o7SUFBRCxjQUFDO0NBQUEsQUE1Q0QsSUE0Q0MifQ==,ZGVjbGFyZSBmdW5jdGlvbiBDbGFzc0RlY29yYXRvcjEodGFyZ2V0OiBGdW5jdGlvbik6IHZvaWQ7CmRlY2xhcmUgZnVuY3Rpb24gQ2xhc3NEZWNvcmF0b3IyKHg6IG51bWJlcik6ICh0YXJnZXQ6IEZ1bmN0aW9uKSA9PiB2b2lkOwpkZWNsYXJlIGZ1bmN0aW9uIFByb3BlcnR5RGVjb3JhdG9yMSh0YXJnZXQ6IE9iamVjdCwga2V5OiBzdHJpbmcgfCBzeW1ib2wsIGRlc2NyaXB0b3I/OiBQcm9wZXJ0eURlc2NyaXB0b3IpOiB2b2lkOwpkZWNsYXJlIGZ1bmN0aW9uIFByb3BlcnR5RGVjb3JhdG9yMih4OiBudW1iZXIpOiAodGFyZ2V0OiBPYmplY3QsIGtleTogc3RyaW5nIHwgc3ltYm9sLCBkZXNjcmlwdG9yPzogUHJvcGVydHlEZXNjcmlwdG9yKSA9PiB2b2lkOwpkZWNsYXJlIGZ1bmN0aW9uIFBhcmFtZXRlckRlY29yYXRvcjEodGFyZ2V0OiBPYmplY3QsIGtleTogc3RyaW5nIHwgc3ltYm9sLCBwYXJhbUluZGV4OiBudW1iZXIpOiB2b2lkOwpkZWNsYXJlIGZ1bmN0aW9uIFBhcmFtZXRlckRlY29yYXRvcjIoeDogbnVtYmVyKTogKHRhcmdldDogT2JqZWN0LCBrZXk6IHN0cmluZyB8IHN5bWJvbCwgcGFyYW1JbmRleDogbnVtYmVyKSA9PiB2b2lkOwoKQENsYXNzRGVjb3JhdG9yMQpAQ2xhc3NEZWNvcmF0b3IyKDEwKQpjbGFzcyBHcmVldGVyIHsKICAgIGNvbnN0cnVjdG9yKAogICAgICBAUGFyYW1ldGVyRGVjb3JhdG9yMSAKICAgICAgQFBhcmFtZXRlckRlY29yYXRvcjIoMjApIAogICAgICBwdWJsaWMgZ3JlZXRpbmc6IHN0cmluZywgCiAgICAgIAogICAgICBAUGFyYW1ldGVyRGVjb3JhdG9yMSAKICAgICAgQFBhcmFtZXRlckRlY29yYXRvcjIoMzApIAogICAgICAuLi5iOiBzdHJpbmdbXSkgewogICAgfQogICAgCiAgICBAUHJvcGVydHlEZWNvcmF0b3IxCiAgICBAUHJvcGVydHlEZWNvcmF0b3IyKDQwKQogICAgZ3JlZXQoKSB7CiAgICAgICAgcmV0dXJuICI8aDE+IiArIHRoaXMuZ3JlZXRpbmcgKyAiPC9oMT4iOwogICAgfQoKICAgIEBQcm9wZXJ0eURlY29yYXRvcjEKICAgIEBQcm9wZXJ0eURlY29yYXRvcjIoNTApCiAgICBwcml2YXRlIHg6IHN0cmluZzsKCiAgICBAUHJvcGVydHlEZWNvcmF0b3IxCiAgICBAUHJvcGVydHlEZWNvcmF0b3IyKDYwKQogICAgcHJpdmF0ZSBzdGF0aWMgeDE6IG51bWJlciA9IDEwOwogICAgCiAgICBwcml2YXRlIGZuKAogICAgICBAUGFyYW1ldGVyRGVjb3JhdG9yMSAKICAgICAgQFBhcmFtZXRlckRlY29yYXRvcjIoNzApIAogICAgICB4OiBudW1iZXIpIHsKICAgICAgICByZXR1cm4gdGhpcy5ncmVldGluZzsKICAgIH0KCiAgICBAUHJvcGVydHlEZWNvcmF0b3IxCiAgICBAUHJvcGVydHlEZWNvcmF0b3IyKDgwKQogICAgZ2V0IGdyZWV0aW5ncygpIHsKICAgICAgICByZXR1cm4gdGhpcy5ncmVldGluZzsKICAgIH0KCiAgICBzZXQgZ3JlZXRpbmdzKAogICAgICBAUGFyYW1ldGVyRGVjb3JhdG9yMSAKICAgICAgQFBhcmFtZXRlckRlY29yYXRvcjIoOTApIAogICAgICBncmVldGluZ3M6IHN0cmluZykgewogICAgICAgIHRoaXMuZ3JlZXRpbmcgPSBncmVldGluZ3M7CiAgICB9ICAgIAp9 +{"version":3,"file":"sourceMapValidationDecorators.js","sourceRoot":"","sources":["sourceMapValidationDecorators.ts"],"names":[],"mappings":";;;;;;;;;AASA;IACI,iBAGS,QAAgB;QAAhB,aAAQ,GAAR,QAAQ,CAAQ;IAKzB,CAAC;IAID,uBAAK,GAAL;QACI,OAAO,MAAM,GAAG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC5C,CAAC;IAUO,oBAAE,GAAV,UAGE,CAAS;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAID,sBAAI,8BAAS;aAAb;YACI,OAAO,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;aAED,UAGE,SAAiB;YACf,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC9B,CAAC;;;OAPA;IAbc,UAAE,GAAW,EAAE,CAAC;IAV/B;QAFC,kBAAkB;QAClB,kBAAkB,CAAC,EAAE,CAAC;wCAGtB;IAID;QAFC,kBAAkB;QAClB,kBAAkB,CAAC,EAAE,CAAC;sCACL;IAMlB;QACG,WAAA,mBAAmB,CAAA;QACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;qCAGzB;IAID;QAFC,kBAAkB;QAClB,kBAAkB,CAAC,EAAE,CAAC;QAMpB,WAAA,mBAAmB,CAAA;QACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;4CAJzB;IAbD;QAFC,kBAAkB;QAClB,kBAAkB,CAAC,EAAE,CAAC;6BACQ;IAvB7B,OAAO;QAFZ,eAAe;QACf,eAAe,CAAC,EAAE,CAAC;QAGb,WAAA,mBAAmB,CAAA;QACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;QAGvB,WAAA,mBAAmB,CAAA;QACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;OAPxB,OAAO,CA4CZ;IAAD,cAAC;CAAA,AA5CD,IA4CC"} +//// https://sokra.github.io/source-map-visualization#base64,dmFyIF9fZGVjb3JhdGUgPSAodGhpcyAmJiB0aGlzLl9fZGVjb3JhdGUpIHx8IGZ1bmN0aW9uIChkZWNvcmF0b3JzLCB0YXJnZXQsIGtleSwgZGVzYykgew0KICAgIHZhciBjID0gYXJndW1lbnRzLmxlbmd0aCwgciA9IGMgPCAzID8gdGFyZ2V0IDogZGVzYyA9PT0gbnVsbCA/IGRlc2MgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKHRhcmdldCwga2V5KSA6IGRlc2MsIGQ7DQogICAgaWYgKHR5cGVvZiBSZWZsZWN0ID09PSAib2JqZWN0IiAmJiB0eXBlb2YgUmVmbGVjdC5kZWNvcmF0ZSA9PT0gImZ1bmN0aW9uIikgciA9IFJlZmxlY3QuZGVjb3JhdGUoZGVjb3JhdG9ycywgdGFyZ2V0LCBrZXksIGRlc2MpOw0KICAgIGVsc2UgZm9yICh2YXIgaSA9IGRlY29yYXRvcnMubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIGlmIChkID0gZGVjb3JhdG9yc1tpXSkgciA9IChjIDwgMyA/IGQocikgOiBjID4gMyA/IGQodGFyZ2V0LCBrZXksIHIpIDogZCh0YXJnZXQsIGtleSkpIHx8IHI7DQogICAgcmV0dXJuIGMgPiAzICYmIHIgJiYgT2JqZWN0LmRlZmluZVByb3BlcnR5KHRhcmdldCwga2V5LCByKSwgcjsNCn07DQp2YXIgX19wYXJhbSA9ICh0aGlzICYmIHRoaXMuX19wYXJhbSkgfHwgZnVuY3Rpb24gKHBhcmFtSW5kZXgsIGRlY29yYXRvcikgew0KICAgIHJldHVybiBmdW5jdGlvbiAodGFyZ2V0LCBrZXkpIHsgZGVjb3JhdG9yKHRhcmdldCwga2V5LCBwYXJhbUluZGV4KTsgfQ0KfTsNCnZhciBHcmVldGVyID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKCkgew0KICAgIGZ1bmN0aW9uIEdyZWV0ZXIoZ3JlZXRpbmcpIHsNCiAgICAgICAgdGhpcy5ncmVldGluZyA9IGdyZWV0aW5nOw0KICAgIH0NCiAgICBHcmVldGVyLnByb3RvdHlwZS5ncmVldCA9IGZ1bmN0aW9uICgpIHsNCiAgICAgICAgcmV0dXJuICI8aDE+IiArIHRoaXMuZ3JlZXRpbmcgKyAiPC9oMT4iOw0KICAgIH07DQogICAgR3JlZXRlci5wcm90b3R5cGUuZm4gPSBmdW5jdGlvbiAoeCkgew0KICAgICAgICByZXR1cm4gdGhpcy5ncmVldGluZzsNCiAgICB9Ow0KICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShHcmVldGVyLnByb3RvdHlwZSwgImdyZWV0aW5ncyIsIHsNCiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7DQogICAgICAgICAgICByZXR1cm4gdGhpcy5ncmVldGluZzsNCiAgICAgICAgfSwNCiAgICAgICAgc2V0OiBmdW5jdGlvbiAoZ3JlZXRpbmdzKSB7DQogICAgICAgICAgICB0aGlzLmdyZWV0aW5nID0gZ3JlZXRpbmdzOw0KICAgICAgICB9LA0KICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSwNCiAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlDQogICAgfSk7DQogICAgR3JlZXRlci54MSA9IDEwOw0KICAgIF9fZGVjb3JhdGUoWw0KICAgICAgICBQcm9wZXJ0eURlY29yYXRvcjEsDQogICAgICAgIFByb3BlcnR5RGVjb3JhdG9yMig0MCkNCiAgICBdLCBHcmVldGVyLnByb3RvdHlwZSwgImdyZWV0IiwgbnVsbCk7DQogICAgX19kZWNvcmF0ZShbDQogICAgICAgIFByb3BlcnR5RGVjb3JhdG9yMSwNCiAgICAgICAgUHJvcGVydHlEZWNvcmF0b3IyKDUwKQ0KICAgIF0sIEdyZWV0ZXIucHJvdG90eXBlLCAieCIsIHZvaWQgMCk7DQogICAgX19kZWNvcmF0ZShbDQogICAgICAgIF9fcGFyYW0oMCwgUGFyYW1ldGVyRGVjb3JhdG9yMSksDQogICAgICAgIF9fcGFyYW0oMCwgUGFyYW1ldGVyRGVjb3JhdG9yMig3MCkpDQogICAgXSwgR3JlZXRlci5wcm90b3R5cGUsICJmbiIsIG51bGwpOw0KICAgIF9fZGVjb3JhdGUoWw0KICAgICAgICBQcm9wZXJ0eURlY29yYXRvcjEsDQogICAgICAgIFByb3BlcnR5RGVjb3JhdG9yMig4MCksDQogICAgICAgIF9fcGFyYW0oMCwgUGFyYW1ldGVyRGVjb3JhdG9yMSksDQogICAgICAgIF9fcGFyYW0oMCwgUGFyYW1ldGVyRGVjb3JhdG9yMig5MCkpDQogICAgXSwgR3JlZXRlci5wcm90b3R5cGUsICJncmVldGluZ3MiLCBudWxsKTsNCiAgICBfX2RlY29yYXRlKFsNCiAgICAgICAgUHJvcGVydHlEZWNvcmF0b3IxLA0KICAgICAgICBQcm9wZXJ0eURlY29yYXRvcjIoNjApDQogICAgXSwgR3JlZXRlciwgIngxIiwgdm9pZCAwKTsNCiAgICBHcmVldGVyID0gX19kZWNvcmF0ZShbDQogICAgICAgIENsYXNzRGVjb3JhdG9yMSwNCiAgICAgICAgQ2xhc3NEZWNvcmF0b3IyKDEwKSwNCiAgICAgICAgX19wYXJhbSgwLCBQYXJhbWV0ZXJEZWNvcmF0b3IxKSwNCiAgICAgICAgX19wYXJhbSgwLCBQYXJhbWV0ZXJEZWNvcmF0b3IyKDIwKSksDQogICAgICAgIF9fcGFyYW0oMSwgUGFyYW1ldGVyRGVjb3JhdG9yMSksDQogICAgICAgIF9fcGFyYW0oMSwgUGFyYW1ldGVyRGVjb3JhdG9yMigzMCkpDQogICAgXSwgR3JlZXRlcik7DQogICAgcmV0dXJuIEdyZWV0ZXI7DQp9KCkpOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9c291cmNlTWFwVmFsaWRhdGlvbkRlY29yYXRvcnMuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlTWFwVmFsaWRhdGlvbkRlY29yYXRvcnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJzb3VyY2VNYXBWYWxpZGF0aW9uRGVjb3JhdG9ycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFTQTtJQUNJLGlCQUdTLFFBQWdCO1FBQWhCLGFBQVEsR0FBUixRQUFRLENBQVE7SUFLekIsQ0FBQztJQUlELHVCQUFLLEdBQUw7UUFDSSxPQUFPLE1BQU0sR0FBRyxJQUFJLENBQUMsUUFBUSxHQUFHLE9BQU8sQ0FBQztJQUM1QyxDQUFDO0lBVU8sb0JBQUUsR0FBVixVQUdFLENBQVM7UUFDUCxPQUFPLElBQUksQ0FBQyxRQUFRLENBQUM7SUFDekIsQ0FBQztJQUlELHNCQUFJLDhCQUFTO2FBQWI7WUFDSSxPQUFPLElBQUksQ0FBQyxRQUFRLENBQUM7UUFDekIsQ0FBQzthQUVELFVBR0UsU0FBaUI7WUFDZixJQUFJLENBQUMsUUFBUSxHQUFHLFNBQVMsQ0FBQztRQUM5QixDQUFDOzs7T0FQQTtJQWJjLFVBQUUsR0FBVyxFQUFFLENBQUM7SUFWL0I7UUFGQyxrQkFBa0I7UUFDbEIsa0JBQWtCLENBQUMsRUFBRSxDQUFDO3dDQUd0QjtJQUlEO1FBRkMsa0JBQWtCO1FBQ2xCLGtCQUFrQixDQUFDLEVBQUUsQ0FBQztzQ0FDTDtJQU1sQjtRQUNHLFdBQUEsbUJBQW1CLENBQUE7UUFDbkIsV0FBQSxtQkFBbUIsQ0FBQyxFQUFFLENBQUMsQ0FBQTtxQ0FHekI7SUFJRDtRQUZDLGtCQUFrQjtRQUNsQixrQkFBa0IsQ0FBQyxFQUFFLENBQUM7UUFNcEIsV0FBQSxtQkFBbUIsQ0FBQTtRQUNuQixXQUFBLG1CQUFtQixDQUFDLEVBQUUsQ0FBQyxDQUFBOzRDQUp6QjtJQWJEO1FBRkMsa0JBQWtCO1FBQ2xCLGtCQUFrQixDQUFDLEVBQUUsQ0FBQzs2QkFDUTtJQXZCN0IsT0FBTztRQUZaLGVBQWU7UUFDZixlQUFlLENBQUMsRUFBRSxDQUFDO1FBR2IsV0FBQSxtQkFBbUIsQ0FBQTtRQUNuQixXQUFBLG1CQUFtQixDQUFDLEVBQUUsQ0FBQyxDQUFBO1FBR3ZCLFdBQUEsbUJBQW1CLENBQUE7UUFDbkIsV0FBQSxtQkFBbUIsQ0FBQyxFQUFFLENBQUMsQ0FBQTtPQVB4QixPQUFPLENBNENaO0lBQUQsY0FBQztDQUFBLEFBNUNELElBNENDIn0=,ZGVjbGFyZSBmdW5jdGlvbiBDbGFzc0RlY29yYXRvcjEodGFyZ2V0OiBGdW5jdGlvbik6IHZvaWQ7CmRlY2xhcmUgZnVuY3Rpb24gQ2xhc3NEZWNvcmF0b3IyKHg6IG51bWJlcik6ICh0YXJnZXQ6IEZ1bmN0aW9uKSA9PiB2b2lkOwpkZWNsYXJlIGZ1bmN0aW9uIFByb3BlcnR5RGVjb3JhdG9yMSh0YXJnZXQ6IE9iamVjdCwga2V5OiBzdHJpbmcgfCBzeW1ib2wsIGRlc2NyaXB0b3I/OiBQcm9wZXJ0eURlc2NyaXB0b3IpOiB2b2lkOwpkZWNsYXJlIGZ1bmN0aW9uIFByb3BlcnR5RGVjb3JhdG9yMih4OiBudW1iZXIpOiAodGFyZ2V0OiBPYmplY3QsIGtleTogc3RyaW5nIHwgc3ltYm9sLCBkZXNjcmlwdG9yPzogUHJvcGVydHlEZXNjcmlwdG9yKSA9PiB2b2lkOwpkZWNsYXJlIGZ1bmN0aW9uIFBhcmFtZXRlckRlY29yYXRvcjEodGFyZ2V0OiBPYmplY3QsIGtleTogc3RyaW5nIHwgc3ltYm9sLCBwYXJhbUluZGV4OiBudW1iZXIpOiB2b2lkOwpkZWNsYXJlIGZ1bmN0aW9uIFBhcmFtZXRlckRlY29yYXRvcjIoeDogbnVtYmVyKTogKHRhcmdldDogT2JqZWN0LCBrZXk6IHN0cmluZyB8IHN5bWJvbCwgcGFyYW1JbmRleDogbnVtYmVyKSA9PiB2b2lkOwoKQENsYXNzRGVjb3JhdG9yMQpAQ2xhc3NEZWNvcmF0b3IyKDEwKQpjbGFzcyBHcmVldGVyIHsKICAgIGNvbnN0cnVjdG9yKAogICAgICBAUGFyYW1ldGVyRGVjb3JhdG9yMSAKICAgICAgQFBhcmFtZXRlckRlY29yYXRvcjIoMjApIAogICAgICBwdWJsaWMgZ3JlZXRpbmc6IHN0cmluZywgCiAgICAgIAogICAgICBAUGFyYW1ldGVyRGVjb3JhdG9yMSAKICAgICAgQFBhcmFtZXRlckRlY29yYXRvcjIoMzApIAogICAgICAuLi5iOiBzdHJpbmdbXSkgewogICAgfQogICAgCiAgICBAUHJvcGVydHlEZWNvcmF0b3IxCiAgICBAUHJvcGVydHlEZWNvcmF0b3IyKDQwKQogICAgZ3JlZXQoKSB7CiAgICAgICAgcmV0dXJuICI8aDE+IiArIHRoaXMuZ3JlZXRpbmcgKyAiPC9oMT4iOwogICAgfQoKICAgIEBQcm9wZXJ0eURlY29yYXRvcjEKICAgIEBQcm9wZXJ0eURlY29yYXRvcjIoNTApCiAgICBwcml2YXRlIHg6IHN0cmluZzsKCiAgICBAUHJvcGVydHlEZWNvcmF0b3IxCiAgICBAUHJvcGVydHlEZWNvcmF0b3IyKDYwKQogICAgcHJpdmF0ZSBzdGF0aWMgeDE6IG51bWJlciA9IDEwOwogICAgCiAgICBwcml2YXRlIGZuKAogICAgICBAUGFyYW1ldGVyRGVjb3JhdG9yMSAKICAgICAgQFBhcmFtZXRlckRlY29yYXRvcjIoNzApIAogICAgICB4OiBudW1iZXIpIHsKICAgICAgICByZXR1cm4gdGhpcy5ncmVldGluZzsKICAgIH0KCiAgICBAUHJvcGVydHlEZWNvcmF0b3IxCiAgICBAUHJvcGVydHlEZWNvcmF0b3IyKDgwKQogICAgZ2V0IGdyZWV0aW5ncygpIHsKICAgICAgICByZXR1cm4gdGhpcy5ncmVldGluZzsKICAgIH0KCiAgICBzZXQgZ3JlZXRpbmdzKAogICAgICBAUGFyYW1ldGVyRGVjb3JhdG9yMSAKICAgICAgQFBhcmFtZXRlckRlY29yYXRvcjIoOTApIAogICAgICBncmVldGluZ3M6IHN0cmluZykgewogICAgICAgIHRoaXMuZ3JlZXRpbmcgPSBncmVldGluZ3M7CiAgICB9ICAgIAp9 diff --git a/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt index de57be0e9fa38..23130b869ea02 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt @@ -36,6 +36,7 @@ sourceFile:sourceMapValidationDecorators.ts 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^ +4 > ^^^^^-> 1->class Greeter { > 2 > constructor( @@ -47,64 +48,22 @@ sourceFile:sourceMapValidationDecorators.ts 2 >Emitted(11, 22) Source(14, 14) + SourceIndex(0) 3 >Emitted(11, 30) Source(14, 30) + SourceIndex(0) --- ->>> var b = []; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >, - > - > @ParameterDecorator1 - > @ParameterDecorator2(30) - > -2 > ...b: string[] -1 >Emitted(12, 9) Source(18, 7) + SourceIndex(0) -2 >Emitted(12, 20) Source(18, 21) + SourceIndex(0) ---- ->>> for (var _i = 1; _i < arguments.length; _i++) { -1->^^^^^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: string[] -3 > -4 > ...b: string[] -5 > -6 > ...b: string[] -1->Emitted(13, 14) Source(18, 7) + SourceIndex(0) -2 >Emitted(13, 24) Source(18, 21) + SourceIndex(0) -3 >Emitted(13, 26) Source(18, 7) + SourceIndex(0) -4 >Emitted(13, 47) Source(18, 21) + SourceIndex(0) -5 >Emitted(13, 49) Source(18, 7) + SourceIndex(0) -6 >Emitted(13, 53) Source(18, 21) + SourceIndex(0) ---- ->>> b[_i - 1] = arguments[_i]; -1 >^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: string[] -1 >Emitted(14, 13) Source(18, 7) + SourceIndex(0) -2 >Emitted(14, 39) Source(18, 21) + SourceIndex(0) ---- ->>> } >>> this.greeting = greeting; -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^^^^^^^^^^^^^ 3 > ^^^ 4 > ^^^^^^^^ 5 > ^ -1 > +1-> 2 > greeting 3 > 4 > greeting 5 > : string -1 >Emitted(16, 9) Source(14, 14) + SourceIndex(0) -2 >Emitted(16, 22) Source(14, 22) + SourceIndex(0) -3 >Emitted(16, 25) Source(14, 14) + SourceIndex(0) -4 >Emitted(16, 33) Source(14, 22) + SourceIndex(0) -5 >Emitted(16, 34) Source(14, 30) + SourceIndex(0) +1->Emitted(12, 9) Source(14, 14) + SourceIndex(0) +2 >Emitted(12, 22) Source(14, 22) + SourceIndex(0) +3 >Emitted(12, 25) Source(14, 14) + SourceIndex(0) +4 >Emitted(12, 33) Source(14, 22) + SourceIndex(0) +5 >Emitted(12, 34) Source(14, 30) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -117,8 +76,8 @@ sourceFile:sourceMapValidationDecorators.ts > ...b: string[]) { > 2 > } -1 >Emitted(17, 5) Source(19, 5) + SourceIndex(0) -2 >Emitted(17, 6) Source(19, 6) + SourceIndex(0) +1 >Emitted(13, 5) Source(19, 5) + SourceIndex(0) +2 >Emitted(13, 6) Source(19, 6) + SourceIndex(0) --- >>> Greeter.prototype.greet = function () { 1->^^^^ @@ -132,9 +91,9 @@ sourceFile:sourceMapValidationDecorators.ts > 2 > greet 3 > -1->Emitted(18, 5) Source(23, 5) + SourceIndex(0) -2 >Emitted(18, 28) Source(23, 10) + SourceIndex(0) -3 >Emitted(18, 31) Source(23, 5) + SourceIndex(0) +1->Emitted(14, 5) Source(23, 5) + SourceIndex(0) +2 >Emitted(14, 28) Source(23, 10) + SourceIndex(0) +3 >Emitted(14, 31) Source(23, 5) + SourceIndex(0) --- >>> return "

" + this.greeting + "

"; 1->^^^^^^^^ @@ -158,16 +117,16 @@ sourceFile:sourceMapValidationDecorators.ts 8 > + 9 > "" 10> ; -1->Emitted(19, 9) Source(24, 9) + SourceIndex(0) -2 >Emitted(19, 16) Source(24, 16) + SourceIndex(0) -3 >Emitted(19, 22) Source(24, 22) + SourceIndex(0) -4 >Emitted(19, 25) Source(24, 25) + SourceIndex(0) -5 >Emitted(19, 29) Source(24, 29) + SourceIndex(0) -6 >Emitted(19, 30) Source(24, 30) + SourceIndex(0) -7 >Emitted(19, 38) Source(24, 38) + SourceIndex(0) -8 >Emitted(19, 41) Source(24, 41) + SourceIndex(0) -9 >Emitted(19, 48) Source(24, 48) + SourceIndex(0) -10>Emitted(19, 49) Source(24, 49) + SourceIndex(0) +1->Emitted(15, 9) Source(24, 9) + SourceIndex(0) +2 >Emitted(15, 16) Source(24, 16) + SourceIndex(0) +3 >Emitted(15, 22) Source(24, 22) + SourceIndex(0) +4 >Emitted(15, 25) Source(24, 25) + SourceIndex(0) +5 >Emitted(15, 29) Source(24, 29) + SourceIndex(0) +6 >Emitted(15, 30) Source(24, 30) + SourceIndex(0) +7 >Emitted(15, 38) Source(24, 38) + SourceIndex(0) +8 >Emitted(15, 41) Source(24, 41) + SourceIndex(0) +9 >Emitted(15, 48) Source(24, 48) + SourceIndex(0) +10>Emitted(15, 49) Source(24, 49) + SourceIndex(0) --- >>> }; 1 >^^^^ @@ -176,8 +135,8 @@ sourceFile:sourceMapValidationDecorators.ts 1 > > 2 > } -1 >Emitted(20, 5) Source(25, 5) + SourceIndex(0) -2 >Emitted(20, 6) Source(25, 6) + SourceIndex(0) +1 >Emitted(16, 5) Source(25, 5) + SourceIndex(0) +2 >Emitted(16, 6) Source(25, 6) + SourceIndex(0) --- >>> Greeter.prototype.fn = function (x) { 1->^^^^ @@ -203,11 +162,11 @@ sourceFile:sourceMapValidationDecorators.ts > @ParameterDecorator2(70) > 5 > x: number -1->Emitted(21, 5) Source(35, 13) + SourceIndex(0) -2 >Emitted(21, 25) Source(35, 15) + SourceIndex(0) -3 >Emitted(21, 28) Source(35, 5) + SourceIndex(0) -4 >Emitted(21, 38) Source(38, 7) + SourceIndex(0) -5 >Emitted(21, 39) Source(38, 16) + SourceIndex(0) +1->Emitted(17, 5) Source(35, 13) + SourceIndex(0) +2 >Emitted(17, 25) Source(35, 15) + SourceIndex(0) +3 >Emitted(17, 28) Source(35, 5) + SourceIndex(0) +4 >Emitted(17, 38) Source(38, 7) + SourceIndex(0) +5 >Emitted(17, 39) Source(38, 16) + SourceIndex(0) --- >>> return this.greeting; 1 >^^^^^^^^ @@ -223,12 +182,12 @@ sourceFile:sourceMapValidationDecorators.ts 4 > . 5 > greeting 6 > ; -1 >Emitted(22, 9) Source(39, 9) + SourceIndex(0) -2 >Emitted(22, 16) Source(39, 16) + SourceIndex(0) -3 >Emitted(22, 20) Source(39, 20) + SourceIndex(0) -4 >Emitted(22, 21) Source(39, 21) + SourceIndex(0) -5 >Emitted(22, 29) Source(39, 29) + SourceIndex(0) -6 >Emitted(22, 30) Source(39, 30) + SourceIndex(0) +1 >Emitted(18, 9) Source(39, 9) + SourceIndex(0) +2 >Emitted(18, 16) Source(39, 16) + SourceIndex(0) +3 >Emitted(18, 20) Source(39, 20) + SourceIndex(0) +4 >Emitted(18, 21) Source(39, 21) + SourceIndex(0) +5 >Emitted(18, 29) Source(39, 29) + SourceIndex(0) +6 >Emitted(18, 30) Source(39, 30) + SourceIndex(0) --- >>> }; 1 >^^^^ @@ -237,8 +196,8 @@ sourceFile:sourceMapValidationDecorators.ts 1 > > 2 > } -1 >Emitted(23, 5) Source(40, 5) + SourceIndex(0) -2 >Emitted(23, 6) Source(40, 6) + SourceIndex(0) +1 >Emitted(19, 5) Source(40, 5) + SourceIndex(0) +2 >Emitted(19, 6) Source(40, 6) + SourceIndex(0) --- >>> Object.defineProperty(Greeter.prototype, "greetings", { 1->^^^^ @@ -251,15 +210,15 @@ sourceFile:sourceMapValidationDecorators.ts > 2 > get 3 > greetings -1->Emitted(24, 5) Source(44, 5) + SourceIndex(0) -2 >Emitted(24, 27) Source(44, 9) + SourceIndex(0) -3 >Emitted(24, 57) Source(44, 18) + SourceIndex(0) +1->Emitted(20, 5) Source(44, 5) + SourceIndex(0) +2 >Emitted(20, 27) Source(44, 9) + SourceIndex(0) +3 >Emitted(20, 57) Source(44, 18) + SourceIndex(0) --- >>> get: function () { 1 >^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(25, 14) Source(44, 5) + SourceIndex(0) +1 >Emitted(21, 14) Source(44, 5) + SourceIndex(0) --- >>> return this.greeting; 1->^^^^^^^^^^^^ @@ -275,12 +234,12 @@ sourceFile:sourceMapValidationDecorators.ts 4 > . 5 > greeting 6 > ; -1->Emitted(26, 13) Source(45, 9) + SourceIndex(0) -2 >Emitted(26, 20) Source(45, 16) + SourceIndex(0) -3 >Emitted(26, 24) Source(45, 20) + SourceIndex(0) -4 >Emitted(26, 25) Source(45, 21) + SourceIndex(0) -5 >Emitted(26, 33) Source(45, 29) + SourceIndex(0) -6 >Emitted(26, 34) Source(45, 30) + SourceIndex(0) +1->Emitted(22, 13) Source(45, 9) + SourceIndex(0) +2 >Emitted(22, 20) Source(45, 16) + SourceIndex(0) +3 >Emitted(22, 24) Source(45, 20) + SourceIndex(0) +4 >Emitted(22, 25) Source(45, 21) + SourceIndex(0) +5 >Emitted(22, 33) Source(45, 29) + SourceIndex(0) +6 >Emitted(22, 34) Source(45, 30) + SourceIndex(0) --- >>> }, 1 >^^^^^^^^ @@ -289,8 +248,8 @@ sourceFile:sourceMapValidationDecorators.ts 1 > > 2 > } -1 >Emitted(27, 9) Source(46, 5) + SourceIndex(0) -2 >Emitted(27, 10) Source(46, 6) + SourceIndex(0) +1 >Emitted(23, 9) Source(46, 5) + SourceIndex(0) +2 >Emitted(23, 10) Source(46, 6) + SourceIndex(0) --- >>> set: function (greetings) { 1->^^^^^^^^^^^^^ @@ -305,9 +264,9 @@ sourceFile:sourceMapValidationDecorators.ts > @ParameterDecorator2(90) > 3 > greetings: string -1->Emitted(28, 14) Source(48, 5) + SourceIndex(0) -2 >Emitted(28, 24) Source(51, 7) + SourceIndex(0) -3 >Emitted(28, 33) Source(51, 24) + SourceIndex(0) +1->Emitted(24, 14) Source(48, 5) + SourceIndex(0) +2 >Emitted(24, 24) Source(51, 7) + SourceIndex(0) +3 >Emitted(24, 33) Source(51, 24) + SourceIndex(0) --- >>> this.greeting = greetings; 1->^^^^^^^^^^^^ @@ -325,13 +284,13 @@ sourceFile:sourceMapValidationDecorators.ts 5 > = 6 > greetings 7 > ; -1->Emitted(29, 13) Source(52, 9) + SourceIndex(0) -2 >Emitted(29, 17) Source(52, 13) + SourceIndex(0) -3 >Emitted(29, 18) Source(52, 14) + SourceIndex(0) -4 >Emitted(29, 26) Source(52, 22) + SourceIndex(0) -5 >Emitted(29, 29) Source(52, 25) + SourceIndex(0) -6 >Emitted(29, 38) Source(52, 34) + SourceIndex(0) -7 >Emitted(29, 39) Source(52, 35) + SourceIndex(0) +1->Emitted(25, 13) Source(52, 9) + SourceIndex(0) +2 >Emitted(25, 17) Source(52, 13) + SourceIndex(0) +3 >Emitted(25, 18) Source(52, 14) + SourceIndex(0) +4 >Emitted(25, 26) Source(52, 22) + SourceIndex(0) +5 >Emitted(25, 29) Source(52, 25) + SourceIndex(0) +6 >Emitted(25, 38) Source(52, 34) + SourceIndex(0) +7 >Emitted(25, 39) Source(52, 35) + SourceIndex(0) --- >>> }, 1 >^^^^^^^^ @@ -340,8 +299,8 @@ sourceFile:sourceMapValidationDecorators.ts 1 > > 2 > } -1 >Emitted(30, 9) Source(53, 5) + SourceIndex(0) -2 >Emitted(30, 10) Source(53, 6) + SourceIndex(0) +1 >Emitted(26, 9) Source(53, 5) + SourceIndex(0) +2 >Emitted(26, 10) Source(53, 6) + SourceIndex(0) --- >>> enumerable: false, >>> configurable: true @@ -349,7 +308,7 @@ sourceFile:sourceMapValidationDecorators.ts 1->^^^^^^^ 2 > ^^^^^^^^^^^^^^-> 1-> -1->Emitted(33, 8) Source(46, 6) + SourceIndex(0) +1->Emitted(29, 8) Source(46, 6) + SourceIndex(0) --- >>> Greeter.x1 = 10; 1->^^^^ @@ -362,17 +321,17 @@ sourceFile:sourceMapValidationDecorators.ts 3 > : number = 4 > 10 5 > ; -1->Emitted(34, 5) Source(33, 20) + SourceIndex(0) -2 >Emitted(34, 15) Source(33, 22) + SourceIndex(0) -3 >Emitted(34, 18) Source(33, 33) + SourceIndex(0) -4 >Emitted(34, 20) Source(33, 35) + SourceIndex(0) -5 >Emitted(34, 21) Source(33, 36) + SourceIndex(0) +1->Emitted(30, 5) Source(33, 20) + SourceIndex(0) +2 >Emitted(30, 15) Source(33, 22) + SourceIndex(0) +3 >Emitted(30, 18) Source(33, 33) + SourceIndex(0) +4 >Emitted(30, 20) Source(33, 35) + SourceIndex(0) +5 >Emitted(30, 21) Source(33, 36) + SourceIndex(0) --- >>> __decorate([ 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(35, 5) Source(23, 5) + SourceIndex(0) +1 >Emitted(31, 5) Source(23, 5) + SourceIndex(0) --- >>> PropertyDecorator1, 1->^^^^^^^^ @@ -380,8 +339,8 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ^^^^^-> 1-> 2 > PropertyDecorator1 -1->Emitted(36, 9) Source(21, 6) + SourceIndex(0) -2 >Emitted(36, 27) Source(21, 24) + SourceIndex(0) +1->Emitted(32, 9) Source(21, 6) + SourceIndex(0) +2 >Emitted(32, 27) Source(21, 24) + SourceIndex(0) --- >>> PropertyDecorator2(40) 1->^^^^^^^^ @@ -396,11 +355,11 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ( 4 > 40 5 > ) -1->Emitted(37, 9) Source(22, 6) + SourceIndex(0) -2 >Emitted(37, 27) Source(22, 24) + SourceIndex(0) -3 >Emitted(37, 28) Source(22, 25) + SourceIndex(0) -4 >Emitted(37, 30) Source(22, 27) + SourceIndex(0) -5 >Emitted(37, 31) Source(22, 28) + SourceIndex(0) +1->Emitted(33, 9) Source(22, 6) + SourceIndex(0) +2 >Emitted(33, 27) Source(22, 24) + SourceIndex(0) +3 >Emitted(33, 28) Source(22, 25) + SourceIndex(0) +4 >Emitted(33, 30) Source(22, 27) + SourceIndex(0) +5 >Emitted(33, 31) Source(22, 28) + SourceIndex(0) --- >>> ], Greeter.prototype, "greet", null); 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -408,7 +367,7 @@ sourceFile:sourceMapValidationDecorators.ts > greet() { > return "

" + this.greeting + "

"; > } -1->Emitted(38, 41) Source(25, 6) + SourceIndex(0) +1->Emitted(34, 41) Source(25, 6) + SourceIndex(0) --- >>> __decorate([ 1 >^^^^ @@ -418,7 +377,7 @@ sourceFile:sourceMapValidationDecorators.ts > @PropertyDecorator1 > @PropertyDecorator2(50) > -1 >Emitted(39, 5) Source(29, 5) + SourceIndex(0) +1 >Emitted(35, 5) Source(29, 5) + SourceIndex(0) --- >>> PropertyDecorator1, 1->^^^^^^^^ @@ -426,8 +385,8 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ^^^^^-> 1-> 2 > PropertyDecorator1 -1->Emitted(40, 9) Source(27, 6) + SourceIndex(0) -2 >Emitted(40, 27) Source(27, 24) + SourceIndex(0) +1->Emitted(36, 9) Source(27, 6) + SourceIndex(0) +2 >Emitted(36, 27) Source(27, 24) + SourceIndex(0) --- >>> PropertyDecorator2(50) 1->^^^^^^^^ @@ -442,17 +401,17 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ( 4 > 50 5 > ) -1->Emitted(41, 9) Source(28, 6) + SourceIndex(0) -2 >Emitted(41, 27) Source(28, 24) + SourceIndex(0) -3 >Emitted(41, 28) Source(28, 25) + SourceIndex(0) -4 >Emitted(41, 30) Source(28, 27) + SourceIndex(0) -5 >Emitted(41, 31) Source(28, 28) + SourceIndex(0) +1->Emitted(37, 9) Source(28, 6) + SourceIndex(0) +2 >Emitted(37, 27) Source(28, 24) + SourceIndex(0) +3 >Emitted(37, 28) Source(28, 25) + SourceIndex(0) +4 >Emitted(37, 30) Source(28, 27) + SourceIndex(0) +5 >Emitted(37, 31) Source(28, 28) + SourceIndex(0) --- >>> ], Greeter.prototype, "x", void 0); 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> > private x: string; -1->Emitted(42, 39) Source(29, 23) + SourceIndex(0) +1->Emitted(38, 39) Source(29, 23) + SourceIndex(0) --- >>> __decorate([ 1 >^^^^ @@ -464,7 +423,7 @@ sourceFile:sourceMapValidationDecorators.ts > private static x1: number = 10; > > -1 >Emitted(43, 5) Source(35, 5) + SourceIndex(0) +1 >Emitted(39, 5) Source(35, 5) + SourceIndex(0) --- >>> __param(0, ParameterDecorator1), 1->^^^^^^^^ @@ -477,10 +436,10 @@ sourceFile:sourceMapValidationDecorators.ts 2 > 3 > ParameterDecorator1 4 > -1->Emitted(44, 9) Source(36, 8) + SourceIndex(0) -2 >Emitted(44, 20) Source(36, 8) + SourceIndex(0) -3 >Emitted(44, 39) Source(36, 27) + SourceIndex(0) -4 >Emitted(44, 40) Source(36, 27) + SourceIndex(0) +1->Emitted(40, 9) Source(36, 8) + SourceIndex(0) +2 >Emitted(40, 20) Source(36, 8) + SourceIndex(0) +3 >Emitted(40, 39) Source(36, 27) + SourceIndex(0) +4 >Emitted(40, 40) Source(36, 27) + SourceIndex(0) --- >>> __param(0, ParameterDecorator2(70)) 1->^^^^^^^^ @@ -498,13 +457,13 @@ sourceFile:sourceMapValidationDecorators.ts 5 > 70 6 > ) 7 > -1->Emitted(45, 9) Source(37, 8) + SourceIndex(0) -2 >Emitted(45, 20) Source(37, 8) + SourceIndex(0) -3 >Emitted(45, 39) Source(37, 27) + SourceIndex(0) -4 >Emitted(45, 40) Source(37, 28) + SourceIndex(0) -5 >Emitted(45, 42) Source(37, 30) + SourceIndex(0) -6 >Emitted(45, 43) Source(37, 31) + SourceIndex(0) -7 >Emitted(45, 44) Source(37, 31) + SourceIndex(0) +1->Emitted(41, 9) Source(37, 8) + SourceIndex(0) +2 >Emitted(41, 20) Source(37, 8) + SourceIndex(0) +3 >Emitted(41, 39) Source(37, 27) + SourceIndex(0) +4 >Emitted(41, 40) Source(37, 28) + SourceIndex(0) +5 >Emitted(41, 42) Source(37, 30) + SourceIndex(0) +6 >Emitted(41, 43) Source(37, 31) + SourceIndex(0) +7 >Emitted(41, 44) Source(37, 31) + SourceIndex(0) --- >>> ], Greeter.prototype, "fn", null); 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -512,7 +471,7 @@ sourceFile:sourceMapValidationDecorators.ts > x: number) { > return this.greeting; > } -1 >Emitted(46, 38) Source(40, 6) + SourceIndex(0) +1 >Emitted(42, 38) Source(40, 6) + SourceIndex(0) --- >>> __decorate([ 1 >^^^^ @@ -522,7 +481,7 @@ sourceFile:sourceMapValidationDecorators.ts > @PropertyDecorator1 > @PropertyDecorator2(80) > -1 >Emitted(47, 5) Source(44, 5) + SourceIndex(0) +1 >Emitted(43, 5) Source(44, 5) + SourceIndex(0) --- >>> PropertyDecorator1, 1->^^^^^^^^ @@ -530,8 +489,8 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ^^^^^^-> 1-> 2 > PropertyDecorator1 -1->Emitted(48, 9) Source(42, 6) + SourceIndex(0) -2 >Emitted(48, 27) Source(42, 24) + SourceIndex(0) +1->Emitted(44, 9) Source(42, 6) + SourceIndex(0) +2 >Emitted(44, 27) Source(42, 24) + SourceIndex(0) --- >>> PropertyDecorator2(80), 1->^^^^^^^^ @@ -546,11 +505,11 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ( 4 > 80 5 > ) -1->Emitted(49, 9) Source(43, 6) + SourceIndex(0) -2 >Emitted(49, 27) Source(43, 24) + SourceIndex(0) -3 >Emitted(49, 28) Source(43, 25) + SourceIndex(0) -4 >Emitted(49, 30) Source(43, 27) + SourceIndex(0) -5 >Emitted(49, 31) Source(43, 28) + SourceIndex(0) +1->Emitted(45, 9) Source(43, 6) + SourceIndex(0) +2 >Emitted(45, 27) Source(43, 24) + SourceIndex(0) +3 >Emitted(45, 28) Source(43, 25) + SourceIndex(0) +4 >Emitted(45, 30) Source(43, 27) + SourceIndex(0) +5 >Emitted(45, 31) Source(43, 28) + SourceIndex(0) --- >>> __param(0, ParameterDecorator1), 1->^^^^^^^^ @@ -568,10 +527,10 @@ sourceFile:sourceMapValidationDecorators.ts 2 > 3 > ParameterDecorator1 4 > -1->Emitted(50, 9) Source(49, 8) + SourceIndex(0) -2 >Emitted(50, 20) Source(49, 8) + SourceIndex(0) -3 >Emitted(50, 39) Source(49, 27) + SourceIndex(0) -4 >Emitted(50, 40) Source(49, 27) + SourceIndex(0) +1->Emitted(46, 9) Source(49, 8) + SourceIndex(0) +2 >Emitted(46, 20) Source(49, 8) + SourceIndex(0) +3 >Emitted(46, 39) Source(49, 27) + SourceIndex(0) +4 >Emitted(46, 40) Source(49, 27) + SourceIndex(0) --- >>> __param(0, ParameterDecorator2(90)) 1->^^^^^^^^ @@ -590,24 +549,24 @@ sourceFile:sourceMapValidationDecorators.ts 5 > 90 6 > ) 7 > -1->Emitted(51, 9) Source(50, 8) + SourceIndex(0) -2 >Emitted(51, 20) Source(50, 8) + SourceIndex(0) -3 >Emitted(51, 39) Source(50, 27) + SourceIndex(0) -4 >Emitted(51, 40) Source(50, 28) + SourceIndex(0) -5 >Emitted(51, 42) Source(50, 30) + SourceIndex(0) -6 >Emitted(51, 43) Source(50, 31) + SourceIndex(0) -7 >Emitted(51, 44) Source(50, 31) + SourceIndex(0) +1->Emitted(47, 9) Source(50, 8) + SourceIndex(0) +2 >Emitted(47, 20) Source(50, 8) + SourceIndex(0) +3 >Emitted(47, 39) Source(50, 27) + SourceIndex(0) +4 >Emitted(47, 40) Source(50, 28) + SourceIndex(0) +5 >Emitted(47, 42) Source(50, 30) + SourceIndex(0) +6 >Emitted(47, 43) Source(50, 31) + SourceIndex(0) +7 >Emitted(47, 44) Source(50, 31) + SourceIndex(0) --- >>> ], Greeter.prototype, "greetings", null); 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -1->Emitted(52, 45) Source(46, 6) + SourceIndex(0) +1->Emitted(48, 45) Source(46, 6) + SourceIndex(0) --- >>> __decorate([ 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(53, 5) Source(33, 5) + SourceIndex(0) +1 >Emitted(49, 5) Source(33, 5) + SourceIndex(0) --- >>> PropertyDecorator1, 1->^^^^^^^^ @@ -615,8 +574,8 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ^^^^^-> 1-> 2 > PropertyDecorator1 -1->Emitted(54, 9) Source(31, 6) + SourceIndex(0) -2 >Emitted(54, 27) Source(31, 24) + SourceIndex(0) +1->Emitted(50, 9) Source(31, 6) + SourceIndex(0) +2 >Emitted(50, 27) Source(31, 24) + SourceIndex(0) --- >>> PropertyDecorator2(60) 1->^^^^^^^^ @@ -631,17 +590,17 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ( 4 > 60 5 > ) -1->Emitted(55, 9) Source(32, 6) + SourceIndex(0) -2 >Emitted(55, 27) Source(32, 24) + SourceIndex(0) -3 >Emitted(55, 28) Source(32, 25) + SourceIndex(0) -4 >Emitted(55, 30) Source(32, 27) + SourceIndex(0) -5 >Emitted(55, 31) Source(32, 28) + SourceIndex(0) +1->Emitted(51, 9) Source(32, 6) + SourceIndex(0) +2 >Emitted(51, 27) Source(32, 24) + SourceIndex(0) +3 >Emitted(51, 28) Source(32, 25) + SourceIndex(0) +4 >Emitted(51, 30) Source(32, 27) + SourceIndex(0) +5 >Emitted(51, 31) Source(32, 28) + SourceIndex(0) --- >>> ], Greeter, "x1", void 0); 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> > private static x1: number = 10; -1->Emitted(56, 30) Source(33, 36) + SourceIndex(0) +1->Emitted(52, 30) Source(33, 36) + SourceIndex(0) --- >>> Greeter = __decorate([ 1 >^^^^ @@ -649,8 +608,8 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ^^^^^^^^^^^^^^-> 1 > 2 > Greeter -1 >Emitted(57, 5) Source(10, 7) + SourceIndex(0) -2 >Emitted(57, 12) Source(10, 14) + SourceIndex(0) +1 >Emitted(53, 5) Source(10, 7) + SourceIndex(0) +2 >Emitted(53, 12) Source(10, 14) + SourceIndex(0) --- >>> ClassDecorator1, 1->^^^^^^^^ @@ -658,8 +617,8 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ^^^^^^-> 1-> 2 > ClassDecorator1 -1->Emitted(58, 9) Source(8, 2) + SourceIndex(0) -2 >Emitted(58, 24) Source(8, 17) + SourceIndex(0) +1->Emitted(54, 9) Source(8, 2) + SourceIndex(0) +2 >Emitted(54, 24) Source(8, 17) + SourceIndex(0) --- >>> ClassDecorator2(10), 1->^^^^^^^^ @@ -674,11 +633,11 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ( 4 > 10 5 > ) -1->Emitted(59, 9) Source(9, 2) + SourceIndex(0) -2 >Emitted(59, 24) Source(9, 17) + SourceIndex(0) -3 >Emitted(59, 25) Source(9, 18) + SourceIndex(0) -4 >Emitted(59, 27) Source(9, 20) + SourceIndex(0) -5 >Emitted(59, 28) Source(9, 21) + SourceIndex(0) +1->Emitted(55, 9) Source(9, 2) + SourceIndex(0) +2 >Emitted(55, 24) Source(9, 17) + SourceIndex(0) +3 >Emitted(55, 25) Source(9, 18) + SourceIndex(0) +4 >Emitted(55, 27) Source(9, 20) + SourceIndex(0) +5 >Emitted(55, 28) Source(9, 21) + SourceIndex(0) --- >>> __param(0, ParameterDecorator1), 1->^^^^^^^^ @@ -693,10 +652,10 @@ sourceFile:sourceMapValidationDecorators.ts 2 > 3 > ParameterDecorator1 4 > -1->Emitted(60, 9) Source(12, 8) + SourceIndex(0) -2 >Emitted(60, 20) Source(12, 8) + SourceIndex(0) -3 >Emitted(60, 39) Source(12, 27) + SourceIndex(0) -4 >Emitted(60, 40) Source(12, 27) + SourceIndex(0) +1->Emitted(56, 9) Source(12, 8) + SourceIndex(0) +2 >Emitted(56, 20) Source(12, 8) + SourceIndex(0) +3 >Emitted(56, 39) Source(12, 27) + SourceIndex(0) +4 >Emitted(56, 40) Source(12, 27) + SourceIndex(0) --- >>> __param(0, ParameterDecorator2(20)), 1->^^^^^^^^ @@ -714,13 +673,13 @@ sourceFile:sourceMapValidationDecorators.ts 5 > 20 6 > ) 7 > -1->Emitted(61, 9) Source(13, 8) + SourceIndex(0) -2 >Emitted(61, 20) Source(13, 8) + SourceIndex(0) -3 >Emitted(61, 39) Source(13, 27) + SourceIndex(0) -4 >Emitted(61, 40) Source(13, 28) + SourceIndex(0) -5 >Emitted(61, 42) Source(13, 30) + SourceIndex(0) -6 >Emitted(61, 43) Source(13, 31) + SourceIndex(0) -7 >Emitted(61, 44) Source(13, 31) + SourceIndex(0) +1->Emitted(57, 9) Source(13, 8) + SourceIndex(0) +2 >Emitted(57, 20) Source(13, 8) + SourceIndex(0) +3 >Emitted(57, 39) Source(13, 27) + SourceIndex(0) +4 >Emitted(57, 40) Source(13, 28) + SourceIndex(0) +5 >Emitted(57, 42) Source(13, 30) + SourceIndex(0) +6 >Emitted(57, 43) Source(13, 31) + SourceIndex(0) +7 >Emitted(57, 44) Source(13, 31) + SourceIndex(0) --- >>> __param(1, ParameterDecorator1), 1 >^^^^^^^^ @@ -735,10 +694,10 @@ sourceFile:sourceMapValidationDecorators.ts 2 > 3 > ParameterDecorator1 4 > -1 >Emitted(62, 9) Source(16, 8) + SourceIndex(0) -2 >Emitted(62, 20) Source(16, 8) + SourceIndex(0) -3 >Emitted(62, 39) Source(16, 27) + SourceIndex(0) -4 >Emitted(62, 40) Source(16, 27) + SourceIndex(0) +1 >Emitted(58, 9) Source(16, 8) + SourceIndex(0) +2 >Emitted(58, 20) Source(16, 8) + SourceIndex(0) +3 >Emitted(58, 39) Source(16, 27) + SourceIndex(0) +4 >Emitted(58, 40) Source(16, 27) + SourceIndex(0) --- >>> __param(1, ParameterDecorator2(30)) 1->^^^^^^^^ @@ -756,13 +715,13 @@ sourceFile:sourceMapValidationDecorators.ts 5 > 30 6 > ) 7 > -1->Emitted(63, 9) Source(17, 8) + SourceIndex(0) -2 >Emitted(63, 20) Source(17, 8) + SourceIndex(0) -3 >Emitted(63, 39) Source(17, 27) + SourceIndex(0) -4 >Emitted(63, 40) Source(17, 28) + SourceIndex(0) -5 >Emitted(63, 42) Source(17, 30) + SourceIndex(0) -6 >Emitted(63, 43) Source(17, 31) + SourceIndex(0) -7 >Emitted(63, 44) Source(17, 31) + SourceIndex(0) +1->Emitted(59, 9) Source(17, 8) + SourceIndex(0) +2 >Emitted(59, 20) Source(17, 8) + SourceIndex(0) +3 >Emitted(59, 39) Source(17, 27) + SourceIndex(0) +4 >Emitted(59, 40) Source(17, 28) + SourceIndex(0) +5 >Emitted(59, 42) Source(17, 30) + SourceIndex(0) +6 >Emitted(59, 43) Source(17, 31) + SourceIndex(0) +7 >Emitted(59, 44) Source(17, 31) + SourceIndex(0) --- >>> ], Greeter); 1 >^^^^^^^ @@ -816,17 +775,17 @@ sourceFile:sourceMapValidationDecorators.ts > this.greeting = greetings; > } > } -1 >Emitted(64, 8) Source(10, 7) + SourceIndex(0) -2 >Emitted(64, 15) Source(10, 14) + SourceIndex(0) -3 >Emitted(64, 16) Source(54, 2) + SourceIndex(0) +1 >Emitted(60, 8) Source(10, 7) + SourceIndex(0) +2 >Emitted(60, 15) Source(10, 14) + SourceIndex(0) +3 >Emitted(60, 16) Source(54, 2) + SourceIndex(0) --- >>> return Greeter; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(65, 5) Source(54, 1) + SourceIndex(0) -2 >Emitted(65, 19) Source(54, 2) + SourceIndex(0) +1->Emitted(61, 5) Source(54, 1) + SourceIndex(0) +2 >Emitted(61, 19) Source(54, 2) + SourceIndex(0) --- >>>}()); 1 >^ @@ -880,8 +839,8 @@ sourceFile:sourceMapValidationDecorators.ts > this.greeting = greetings; > } > } -1 >Emitted(66, 2) Source(54, 2) + SourceIndex(0) -2 >Emitted(66, 2) Source(10, 1) + SourceIndex(0) -3 >Emitted(66, 6) Source(54, 2) + SourceIndex(0) +1 >Emitted(62, 2) Source(54, 2) + SourceIndex(0) +2 >Emitted(62, 2) Source(10, 1) + SourceIndex(0) +3 >Emitted(62, 6) Source(54, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationDecorators.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationFunctions.js b/tests/baselines/reference/sourceMapValidationFunctions.js index 58222aa48c782..f3aa03895cf65 100644 --- a/tests/baselines/reference/sourceMapValidationFunctions.js +++ b/tests/baselines/reference/sourceMapValidationFunctions.js @@ -21,19 +21,11 @@ function greet(greeting) { } function greet2(greeting, n, x) { if (n === void 0) { n = 10; } - var restParams = []; - for (var _i = 3; _i < arguments.length; _i++) { - restParams[_i - 3] = arguments[_i]; - } greetings++; return greetings; } function foo(greeting, n, x) { if (n === void 0) { n = 10; } - var restParams = []; - for (var _i = 3; _i < arguments.length; _i++) { - restParams[_i - 3] = arguments[_i]; - } return; } //# sourceMappingURL=sourceMapValidationFunctions.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationFunctions.js.map b/tests/baselines/reference/sourceMapValidationFunctions.js.map index ccb271c5fc6d6..db834921a4cf5 100644 --- a/tests/baselines/reference/sourceMapValidationFunctions.js.map +++ b/tests/baselines/reference/sourceMapValidationFunctions.js.map @@ -1,3 +1,3 @@ //// [sourceMapValidationFunctions.js.map] -{"version":3,"file":"sourceMapValidationFunctions.js","sourceRoot":"","sources":["sourceMapValidationFunctions.ts"],"names":[],"mappings":"AAAA,IAAI,SAAS,GAAG,CAAC,CAAC;AAClB,SAAS,KAAK,CAAC,QAAgB;IAC3B,SAAS,EAAE,CAAC;IACZ,OAAO,SAAS,CAAC;AACrB,CAAC;AACD,SAAS,MAAM,CAAC,QAAgB,EAAE,CAAM,EAAE,CAAU;IAAlB,kBAAA,EAAA,MAAM;IAAc,oBAAuB;SAAvB,UAAuB,EAAvB,qBAAuB,EAAvB,IAAuB;QAAvB,mCAAuB;;IACzE,SAAS,EAAE,CAAC;IACZ,OAAO,SAAS,CAAC;AACrB,CAAC;AACD,SAAS,GAAG,CAAC,QAAgB,EAAE,CAAM,EAAE,CAAU;IAAlB,kBAAA,EAAA,MAAM;IAAc,oBAAuB;SAAvB,UAAuB,EAAvB,qBAAuB,EAAvB,IAAuB;QAAvB,mCAAuB;;IAEtE,OAAO;AACX,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,dmFyIGdyZWV0aW5ncyA9IDA7DQpmdW5jdGlvbiBncmVldChncmVldGluZykgew0KICAgIGdyZWV0aW5ncysrOw0KICAgIHJldHVybiBncmVldGluZ3M7DQp9DQpmdW5jdGlvbiBncmVldDIoZ3JlZXRpbmcsIG4sIHgpIHsNCiAgICBpZiAobiA9PT0gdm9pZCAwKSB7IG4gPSAxMDsgfQ0KICAgIHZhciByZXN0UGFyYW1zID0gW107DQogICAgZm9yICh2YXIgX2kgPSAzOyBfaSA8IGFyZ3VtZW50cy5sZW5ndGg7IF9pKyspIHsNCiAgICAgICAgcmVzdFBhcmFtc1tfaSAtIDNdID0gYXJndW1lbnRzW19pXTsNCiAgICB9DQogICAgZ3JlZXRpbmdzKys7DQogICAgcmV0dXJuIGdyZWV0aW5nczsNCn0NCmZ1bmN0aW9uIGZvbyhncmVldGluZywgbiwgeCkgew0KICAgIGlmIChuID09PSB2b2lkIDApIHsgbiA9IDEwOyB9DQogICAgdmFyIHJlc3RQYXJhbXMgPSBbXTsNCiAgICBmb3IgKHZhciBfaSA9IDM7IF9pIDwgYXJndW1lbnRzLmxlbmd0aDsgX2krKykgew0KICAgICAgICByZXN0UGFyYW1zW19pIC0gM10gPSBhcmd1bWVudHNbX2ldOw0KICAgIH0NCiAgICByZXR1cm47DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1zb3VyY2VNYXBWYWxpZGF0aW9uRnVuY3Rpb25zLmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlTWFwVmFsaWRhdGlvbkZ1bmN0aW9ucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInNvdXJjZU1hcFZhbGlkYXRpb25GdW5jdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsSUFBSSxTQUFTLEdBQUcsQ0FBQyxDQUFDO0FBQ2xCLFNBQVMsS0FBSyxDQUFDLFFBQWdCO0lBQzNCLFNBQVMsRUFBRSxDQUFDO0lBQ1osT0FBTyxTQUFTLENBQUM7QUFDckIsQ0FBQztBQUNELFNBQVMsTUFBTSxDQUFDLFFBQWdCLEVBQUUsQ0FBTSxFQUFFLENBQVU7SUFBbEIsa0JBQUEsRUFBQSxNQUFNO0lBQWMsb0JBQXVCO1NBQXZCLFVBQXVCLEVBQXZCLHFCQUF1QixFQUF2QixJQUF1QjtRQUF2QixtQ0FBdUI7O0lBQ3pFLFNBQVMsRUFBRSxDQUFDO0lBQ1osT0FBTyxTQUFTLENBQUM7QUFDckIsQ0FBQztBQUNELFNBQVMsR0FBRyxDQUFDLFFBQWdCLEVBQUUsQ0FBTSxFQUFFLENBQVU7SUFBbEIsa0JBQUEsRUFBQSxNQUFNO0lBQWMsb0JBQXVCO1NBQXZCLFVBQXVCLEVBQXZCLHFCQUF1QixFQUF2QixJQUF1QjtRQUF2QixtQ0FBdUI7O0lBRXRFLE9BQU87QUFDWCxDQUFDIn0=,dmFyIGdyZWV0aW5ncyA9IDA7CmZ1bmN0aW9uIGdyZWV0KGdyZWV0aW5nOiBzdHJpbmcpOiBudW1iZXIgewogICAgZ3JlZXRpbmdzKys7CiAgICByZXR1cm4gZ3JlZXRpbmdzOwp9CmZ1bmN0aW9uIGdyZWV0MihncmVldGluZzogc3RyaW5nLCBuID0gMTAsIHg/OiBzdHJpbmcsIC4uLnJlc3RQYXJhbXM6IHN0cmluZ1tdKTogbnVtYmVyIHsKICAgIGdyZWV0aW5ncysrOwogICAgcmV0dXJuIGdyZWV0aW5nczsKfQpmdW5jdGlvbiBmb28oZ3JlZXRpbmc6IHN0cmluZywgbiA9IDEwLCB4Pzogc3RyaW5nLCAuLi5yZXN0UGFyYW1zOiBzdHJpbmdbXSkKewogICAgcmV0dXJuOwp9 +{"version":3,"file":"sourceMapValidationFunctions.js","sourceRoot":"","sources":["sourceMapValidationFunctions.ts"],"names":[],"mappings":"AAAA,IAAI,SAAS,GAAG,CAAC,CAAC;AAClB,SAAS,KAAK,CAAC,QAAgB;IAC3B,SAAS,EAAE,CAAC;IACZ,OAAO,SAAS,CAAC;AACrB,CAAC;AACD,SAAS,MAAM,CAAC,QAAgB,EAAE,CAAM,EAAE,CAAU;IAAlB,kBAAA,EAAA,MAAM;IACpC,SAAS,EAAE,CAAC;IACZ,OAAO,SAAS,CAAC;AACrB,CAAC;AACD,SAAS,GAAG,CAAC,QAAgB,EAAE,CAAM,EAAE,CAAU;IAAlB,kBAAA,EAAA,MAAM;IAEjC,OAAO;AACX,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,dmFyIGdyZWV0aW5ncyA9IDA7DQpmdW5jdGlvbiBncmVldChncmVldGluZykgew0KICAgIGdyZWV0aW5ncysrOw0KICAgIHJldHVybiBncmVldGluZ3M7DQp9DQpmdW5jdGlvbiBncmVldDIoZ3JlZXRpbmcsIG4sIHgpIHsNCiAgICBpZiAobiA9PT0gdm9pZCAwKSB7IG4gPSAxMDsgfQ0KICAgIGdyZWV0aW5ncysrOw0KICAgIHJldHVybiBncmVldGluZ3M7DQp9DQpmdW5jdGlvbiBmb28oZ3JlZXRpbmcsIG4sIHgpIHsNCiAgICBpZiAobiA9PT0gdm9pZCAwKSB7IG4gPSAxMDsgfQ0KICAgIHJldHVybjsNCn0NCi8vIyBzb3VyY2VNYXBwaW5nVVJMPXNvdXJjZU1hcFZhbGlkYXRpb25GdW5jdGlvbnMuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlTWFwVmFsaWRhdGlvbkZ1bmN0aW9ucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInNvdXJjZU1hcFZhbGlkYXRpb25GdW5jdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsSUFBSSxTQUFTLEdBQUcsQ0FBQyxDQUFDO0FBQ2xCLFNBQVMsS0FBSyxDQUFDLFFBQWdCO0lBQzNCLFNBQVMsRUFBRSxDQUFDO0lBQ1osT0FBTyxTQUFTLENBQUM7QUFDckIsQ0FBQztBQUNELFNBQVMsTUFBTSxDQUFDLFFBQWdCLEVBQUUsQ0FBTSxFQUFFLENBQVU7SUFBbEIsa0JBQUEsRUFBQSxNQUFNO0lBQ3BDLFNBQVMsRUFBRSxDQUFDO0lBQ1osT0FBTyxTQUFTLENBQUM7QUFDckIsQ0FBQztBQUNELFNBQVMsR0FBRyxDQUFDLFFBQWdCLEVBQUUsQ0FBTSxFQUFFLENBQVU7SUFBbEIsa0JBQUEsRUFBQSxNQUFNO0lBRWpDLE9BQU87QUFDWCxDQUFDIn0=,dmFyIGdyZWV0aW5ncyA9IDA7CmZ1bmN0aW9uIGdyZWV0KGdyZWV0aW5nOiBzdHJpbmcpOiBudW1iZXIgewogICAgZ3JlZXRpbmdzKys7CiAgICByZXR1cm4gZ3JlZXRpbmdzOwp9CmZ1bmN0aW9uIGdyZWV0MihncmVldGluZzogc3RyaW5nLCBuID0gMTAsIHg/OiBzdHJpbmcsIC4uLnJlc3RQYXJhbXM6IHN0cmluZ1tdKTogbnVtYmVyIHsKICAgIGdyZWV0aW5ncysrOwogICAgcmV0dXJuIGdyZWV0aW5nczsKfQpmdW5jdGlvbiBmb28oZ3JlZXRpbmc6IHN0cmluZywgbiA9IDEwLCB4Pzogc3RyaW5nLCAuLi5yZXN0UGFyYW1zOiBzdHJpbmdbXSkKewogICAgcmV0dXJuOwp9 diff --git a/tests/baselines/reference/sourceMapValidationFunctions.sourcemap.txt b/tests/baselines/reference/sourceMapValidationFunctions.sourcemap.txt index 420f9b04296ff..8e9df6c02aa67 100644 --- a/tests/baselines/reference/sourceMapValidationFunctions.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationFunctions.sourcemap.txt @@ -133,59 +133,21 @@ sourceFile:sourceMapValidationFunctions.ts 3 >Emitted(7, 25) Source(6, 35) + SourceIndex(0) 4 >Emitted(7, 31) Source(6, 41) + SourceIndex(0) --- ->>> var restParams = []; -1 >^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >, x?: string, -2 > ...restParams: string[] -1 >Emitted(8, 5) Source(6, 55) + SourceIndex(0) -2 >Emitted(8, 25) Source(6, 78) + SourceIndex(0) ---- ->>> for (var _i = 3; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...restParams: string[] -3 > -4 > ...restParams: string[] -5 > -6 > ...restParams: string[] -1->Emitted(9, 10) Source(6, 55) + SourceIndex(0) -2 >Emitted(9, 20) Source(6, 78) + SourceIndex(0) -3 >Emitted(9, 22) Source(6, 55) + SourceIndex(0) -4 >Emitted(9, 43) Source(6, 78) + SourceIndex(0) -5 >Emitted(9, 45) Source(6, 55) + SourceIndex(0) -6 >Emitted(9, 49) Source(6, 78) + SourceIndex(0) ---- ->>> restParams[_i - 3] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...restParams: string[] -1 >Emitted(10, 9) Source(6, 55) + SourceIndex(0) -2 >Emitted(10, 44) Source(6, 78) + SourceIndex(0) ---- ->>> } >>> greetings++; 1 >^^^^ 2 > ^^^^^^^^^ 3 > ^^ 4 > ^ 5 > ^^^^^^-> -1 >): number { +1 >, x?: string, ...restParams: string[]): number { > 2 > greetings 3 > ++ 4 > ; -1 >Emitted(12, 5) Source(7, 5) + SourceIndex(0) -2 >Emitted(12, 14) Source(7, 14) + SourceIndex(0) -3 >Emitted(12, 16) Source(7, 16) + SourceIndex(0) -4 >Emitted(12, 17) Source(7, 17) + SourceIndex(0) +1 >Emitted(8, 5) Source(7, 5) + SourceIndex(0) +2 >Emitted(8, 14) Source(7, 14) + SourceIndex(0) +3 >Emitted(8, 16) Source(7, 16) + SourceIndex(0) +4 >Emitted(8, 17) Source(7, 17) + SourceIndex(0) --- >>> return greetings; 1->^^^^ @@ -197,10 +159,10 @@ sourceFile:sourceMapValidationFunctions.ts 2 > return 3 > greetings 4 > ; -1->Emitted(13, 5) Source(8, 5) + SourceIndex(0) -2 >Emitted(13, 12) Source(8, 12) + SourceIndex(0) -3 >Emitted(13, 21) Source(8, 21) + SourceIndex(0) -4 >Emitted(13, 22) Source(8, 22) + SourceIndex(0) +1->Emitted(9, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(9, 12) Source(8, 12) + SourceIndex(0) +3 >Emitted(9, 21) Source(8, 21) + SourceIndex(0) +4 >Emitted(9, 22) Source(8, 22) + SourceIndex(0) --- >>>} 1 > @@ -209,8 +171,8 @@ sourceFile:sourceMapValidationFunctions.ts 1 > > 2 >} -1 >Emitted(14, 1) Source(9, 1) + SourceIndex(0) -2 >Emitted(14, 2) Source(9, 2) + SourceIndex(0) +1 >Emitted(10, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(9, 2) + SourceIndex(0) --- >>>function foo(greeting, n, x) { 1-> @@ -233,15 +195,15 @@ sourceFile:sourceMapValidationFunctions.ts 7 > n = 10 8 > , 9 > x?: string -1->Emitted(15, 1) Source(10, 1) + SourceIndex(0) -2 >Emitted(15, 10) Source(10, 10) + SourceIndex(0) -3 >Emitted(15, 13) Source(10, 13) + SourceIndex(0) -4 >Emitted(15, 14) Source(10, 14) + SourceIndex(0) -5 >Emitted(15, 22) Source(10, 30) + SourceIndex(0) -6 >Emitted(15, 24) Source(10, 32) + SourceIndex(0) -7 >Emitted(15, 25) Source(10, 38) + SourceIndex(0) -8 >Emitted(15, 27) Source(10, 40) + SourceIndex(0) -9 >Emitted(15, 28) Source(10, 50) + SourceIndex(0) +1->Emitted(11, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(11, 10) Source(10, 10) + SourceIndex(0) +3 >Emitted(11, 13) Source(10, 13) + SourceIndex(0) +4 >Emitted(11, 14) Source(10, 14) + SourceIndex(0) +5 >Emitted(11, 22) Source(10, 30) + SourceIndex(0) +6 >Emitted(11, 24) Source(10, 32) + SourceIndex(0) +7 >Emitted(11, 25) Source(10, 38) + SourceIndex(0) +8 >Emitted(11, 27) Source(10, 40) + SourceIndex(0) +9 >Emitted(11, 28) Source(10, 50) + SourceIndex(0) --- >>> if (n === void 0) { n = 10; } 1->^^^^ @@ -252,58 +214,20 @@ sourceFile:sourceMapValidationFunctions.ts 2 > 3 > 4 > n = 10 -1->Emitted(16, 5) Source(10, 32) + SourceIndex(0) -2 >Emitted(16, 23) Source(10, 32) + SourceIndex(0) -3 >Emitted(16, 25) Source(10, 32) + SourceIndex(0) -4 >Emitted(16, 31) Source(10, 38) + SourceIndex(0) ---- ->>> var restParams = []; -1 >^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >, x?: string, -2 > ...restParams: string[] -1 >Emitted(17, 5) Source(10, 52) + SourceIndex(0) -2 >Emitted(17, 25) Source(10, 75) + SourceIndex(0) ---- ->>> for (var _i = 3; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...restParams: string[] -3 > -4 > ...restParams: string[] -5 > -6 > ...restParams: string[] -1->Emitted(18, 10) Source(10, 52) + SourceIndex(0) -2 >Emitted(18, 20) Source(10, 75) + SourceIndex(0) -3 >Emitted(18, 22) Source(10, 52) + SourceIndex(0) -4 >Emitted(18, 43) Source(10, 75) + SourceIndex(0) -5 >Emitted(18, 45) Source(10, 52) + SourceIndex(0) -6 >Emitted(18, 49) Source(10, 75) + SourceIndex(0) ---- ->>> restParams[_i - 3] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...restParams: string[] -1 >Emitted(19, 9) Source(10, 52) + SourceIndex(0) -2 >Emitted(19, 44) Source(10, 75) + SourceIndex(0) +1->Emitted(12, 5) Source(10, 32) + SourceIndex(0) +2 >Emitted(12, 23) Source(10, 32) + SourceIndex(0) +3 >Emitted(12, 25) Source(10, 32) + SourceIndex(0) +4 >Emitted(12, 31) Source(10, 38) + SourceIndex(0) --- ->>> } >>> return; 1 >^^^^ 2 > ^^^^^^^ -1 >) +1 >, x?: string, ...restParams: string[]) >{ > 2 > return; -1 >Emitted(21, 5) Source(12, 5) + SourceIndex(0) -2 >Emitted(21, 12) Source(12, 12) + SourceIndex(0) +1 >Emitted(13, 5) Source(12, 5) + SourceIndex(0) +2 >Emitted(13, 12) Source(12, 12) + SourceIndex(0) --- >>>} 1 > @@ -312,7 +236,7 @@ sourceFile:sourceMapValidationFunctions.ts 1 > > 2 >} -1 >Emitted(22, 1) Source(13, 1) + SourceIndex(0) -2 >Emitted(22, 2) Source(13, 2) + SourceIndex(0) +1 >Emitted(14, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(13, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationFunctions.js.map \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.js b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.js index 83e659775604a..90467ed6d3f1b 100644 --- a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.js +++ b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.js @@ -117,13 +117,7 @@ var C = /** @class */ (function () { C.prototype.toString = function () { return null; }; C.prototype.charAt = function (pos) { return null; }; C.prototype.charCodeAt = function (index) { return null; }; - C.prototype.concat = function () { - var strings = []; - for (var _i = 0; _i < arguments.length; _i++) { - strings[_i] = arguments[_i]; - } - return null; - }; + C.prototype.concat = function () { return null; }; C.prototype.indexOf = function (searchString, position) { return null; }; C.prototype.lastIndexOf = function (searchString, position) { return null; }; C.prototype.localeCompare = function (that) { return null; }; diff --git a/tests/baselines/reference/stringLiteralTypesOverloads03.js b/tests/baselines/reference/stringLiteralTypesOverloads03.js index 6aec13ee21ee8..e6075a6aa2912 100644 --- a/tests/baselines/reference/stringLiteralTypesOverloads03.js +++ b/tests/baselines/reference/stringLiteralTypesOverloads03.js @@ -49,20 +49,12 @@ var hello; var world; var helloOrWorld; function f() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } return undefined; } var fResult1 = f(hello); var fResult2 = f(world); var fResult3 = f(helloOrWorld); function g() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } return undefined; } var gResult1 = g(hello); diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.js b/tests/baselines/reference/subtypingWithCallSignatures2.js index bd2d50d5b75a6..e75c92e17fa25 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures2.js +++ b/tests/baselines/reference/subtypingWithCallSignatures2.js @@ -265,13 +265,7 @@ var r10arg1 = function () { } return x[0]; }; -var r10arg2 = function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - return null; -}; +var r10arg2 = function () { return null; }; var r10 = foo10(r10arg1); // any var r10a = [r10arg1, r10arg2]; var r10b = [r10arg2, r10arg1]; diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.js b/tests/baselines/reference/subtypingWithCallSignatures3.js index 048bfb9dad3bd..533464335848a 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures3.js +++ b/tests/baselines/reference/subtypingWithCallSignatures3.js @@ -175,20 +175,8 @@ var Errors; var r3 = foo8(r3arg); // any var r3a = [r3arg2, r3arg]; var r3b = [r3arg, r3arg2]; - var r4arg = function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - return null; - }; - var r4arg2 = function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - return null; - }; + var r4arg = function () { return null; }; + var r4arg2 = function () { return null; }; var r4 = foo10(r4arg); // any var r4a = [r4arg2, r4arg]; var r4b = [r4arg, r4arg2]; diff --git a/tests/baselines/reference/taggedTemplateStringsHexadecimalEscapes.js b/tests/baselines/reference/taggedTemplateStringsHexadecimalEscapes.js index f771b886ea055..150e11946f12c 100644 --- a/tests/baselines/reference/taggedTemplateStringsHexadecimalEscapes.js +++ b/tests/baselines/reference/taggedTemplateStringsHexadecimalEscapes.js @@ -10,9 +10,5 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook return cooked; }; function f() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } } f(__makeTemplateObject(["\r", "\n"], ["\\x0D", "\\x0A"]), "Interrupted CRLF"); diff --git a/tests/baselines/reference/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes01.js b/tests/baselines/reference/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes01.js index a355420452830..c8b8fbda41b4f 100644 --- a/tests/baselines/reference/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes01.js +++ b/tests/baselines/reference/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes01.js @@ -11,9 +11,5 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook return cooked; }; function f() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } } f(__makeTemplateObject(["0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2028 2029 0085 t v f b r n"], ["0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2028 2029 0085 t v f b r n"])); diff --git a/tests/baselines/reference/taggedTemplateStringsWithCurriedFunction.js b/tests/baselines/reference/taggedTemplateStringsWithCurriedFunction.js index daba9c27670f9..ddbb905c14174 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithCurriedFunction.js +++ b/tests/baselines/reference/taggedTemplateStringsWithCurriedFunction.js @@ -27,13 +27,7 @@ var __assign = (this && this.__assign) || function () { }; return __assign.apply(this, arguments); }; -var f = function (_) { return function () { - var _ = []; - for (var _i = 0; _i < arguments.length; _i++) { - _[_i] = arguments[_i]; - } - return ""; -}; }; +var f = function (_) { return function () { return ""; }; }; f(__assign({ x: 0 }))(__makeTemplateObject([""], [""])); f(__assign({ x: 0 }))(__makeTemplateObject(["x"], ["x"])); f(__assign({ x: 0 }))(__makeTemplateObject(["x", "x"], ["x", "x"]), f); diff --git a/tests/baselines/reference/taggedTemplateStringsWithMultilineTemplate.js b/tests/baselines/reference/taggedTemplateStringsWithMultilineTemplate.js index d3e9e3d2c43ff..5cb71c792701e 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithMultilineTemplate.js +++ b/tests/baselines/reference/taggedTemplateStringsWithMultilineTemplate.js @@ -13,9 +13,5 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook return cooked; }; function f() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } } f(__makeTemplateObject(["\n\n"], ["\n\\\n\n"])); diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.js b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.js index 7299ea3cbbde2..0468b6bf71157 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.js +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.js @@ -28,10 +28,6 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook return cooked; }; function foo() { - var stuff = []; - for (var _i = 0; _i < arguments.length; _i++) { - stuff[_i] = arguments[_i]; - } return undefined; } var a = foo([]); // number diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.js b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.js index e393484eff6ac..e04ea22a89bbd 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.js +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.js @@ -23,19 +23,11 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook return cooked; }; function foo1() { - var stuff = []; - for (var _i = 0; _i < arguments.length; _i++) { - stuff[_i] = arguments[_i]; - } return undefined; } var a = foo1(__makeTemplateObject(["", ""], ["", ""]), 1); var b = foo1([], 1); function foo2() { - var stuff = []; - for (var _i = 0; _i < arguments.length; _i++) { - stuff[_i] = arguments[_i]; - } return undefined; } var c = foo2(__makeTemplateObject(["", ""], ["", ""]), 1); diff --git a/tests/baselines/reference/taggedTemplateStringsWithTagNamedDeclare.js b/tests/baselines/reference/taggedTemplateStringsWithTagNamedDeclare.js index d1801bdeb6e67..ac64d7a0902aa 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTagNamedDeclare.js +++ b/tests/baselines/reference/taggedTemplateStringsWithTagNamedDeclare.js @@ -10,9 +10,5 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook return cooked; }; function declare(x) { - var ys = []; - for (var _i = 1; _i < arguments.length; _i++) { - ys[_i - 1] = arguments[_i]; - } } declare(__makeTemplateObject(["Hello ", " world!"], ["Hello ", " world!"]), 0); diff --git a/tests/baselines/reference/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js b/tests/baselines/reference/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js index c93dce9340f71..b21273130580e 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js +++ b/tests/baselines/reference/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js @@ -10,9 +10,5 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook return cooked; }; function foo() { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i] = arguments[_i]; - } } foo(__makeTemplateObject(["", ""], ["", ""]), function (x) { x = "bad"; }); diff --git a/tests/baselines/reference/taggedTemplateStringsWithUnicodeEscapes.js b/tests/baselines/reference/taggedTemplateStringsWithUnicodeEscapes.js index a5c35947db718..638e22b83c7fc 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithUnicodeEscapes.js +++ b/tests/baselines/reference/taggedTemplateStringsWithUnicodeEscapes.js @@ -10,9 +10,5 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook return cooked; }; function f() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } } f(__makeTemplateObject(["'\uD83D\uDCA9'", "'\uD83D\uDCA9'"], ["'\\u{1f4a9}'", "'\\uD83D\\uDCA9'"]), " should be converted to "); diff --git a/tests/baselines/reference/taggedTemplateStringsWithWhitespaceEscapes.js b/tests/baselines/reference/taggedTemplateStringsWithWhitespaceEscapes.js index 73aa63931a66f..5c6c79e862a97 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithWhitespaceEscapes.js +++ b/tests/baselines/reference/taggedTemplateStringsWithWhitespaceEscapes.js @@ -10,9 +10,5 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook return cooked; }; function f() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } } f(__makeTemplateObject(["\t\n\v\f\r\\"], ["\\t\\n\\v\\f\\r\\\\"])); diff --git a/tests/baselines/reference/taggedTemplatesInDifferentScopes.js b/tests/baselines/reference/taggedTemplatesInDifferentScopes.js index d613d7b7948fe..0358689abfd2d 100644 --- a/tests/baselines/reference/taggedTemplatesInDifferentScopes.js +++ b/tests/baselines/reference/taggedTemplatesInDifferentScopes.js @@ -25,10 +25,6 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook exports.__esModule = true; exports.tag = void 0; function tag(parts) { - var values = []; - for (var _i = 1; _i < arguments.length; _i++) { - values[_i - 1] = arguments[_i]; - } return parts[0]; } exports.tag = tag; diff --git a/tests/baselines/reference/trailingCommasInFunctionParametersAndArguments.js b/tests/baselines/reference/trailingCommasInFunctionParametersAndArguments.js index 0484c062321a7..2d7e5093e607a 100644 --- a/tests/baselines/reference/trailingCommasInFunctionParametersAndArguments.js +++ b/tests/baselines/reference/trailingCommasInFunctionParametersAndArguments.js @@ -34,12 +34,7 @@ new X(1,); //// [trailingCommasInFunctionParametersAndArguments.js] function f1(x) { } f1(1); -function f2() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } -} +function f2() { } f2.apply(void 0, []); f3(1); f3(1, 2); diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js index 15f1cddb0f277..7bbb512e0a188 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js @@ -58,12 +58,7 @@ var __rest = (this && this.__rest) || function (s, e) { return t; }; var myGlob = 20; -function libfile0Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function libfile0Spread() { } libfile0Spread.apply(void 0, __spread([10, 20, 30])); define("file1", ["require", "exports"], function (require, exports) { "use strict"; @@ -92,17 +87,12 @@ define("file3", ["require", "exports"], function (require, exports) { } }); var myVar = 30; -function appfile4Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function appfile4Spread() { } appfile4Spread.apply(void 0, __spread([10, 20, 30])); //# sourceMappingURL=module.js.map //// [/src/app/module.js.map] -{"version":3,"file":"module.js","sourceRoot":"","sources":["../lib/file0.ts","../lib/file1.ts","../lib/file2.ts","../lib/global.ts","file3.ts","file4.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;;;;;ICFnB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,SAAS,eAAe;QAC5C,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;IAChD,CAAC;IAAA,OAAO,CAAC,GAAG,CAAC,SAAC,CAAC,CAAC;;;;;;ICFH,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC;;;;;ICAV,QAAA,CAAC,GAAG,EAAE,CAAC;IACM,SAAS,eAAe;QAClD,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;IAChD,CAAC;;ACHD,IAAM,KAAK,GAAG,EAAE,CAAC;AACjB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} +{"version":3,"file":"module.js","sourceRoot":"","sources":["../lib/file0.ts","../lib/file1.ts","../lib/file2.ts","../lib/global.ts","file3.ts","file4.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,SAAS,cAAc,KAAmB,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;;;;;ICFnB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,SAAS,eAAe;QAC5C,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;IAChD,CAAC;IAAA,OAAO,CAAC,GAAG,CAAC,SAAC,CAAC,CAAC;;;;;;ICFH,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC;;;;;ICAV,QAAA,CAAC,GAAG,EAAE,CAAC;IACM,SAAS,eAAe;QAClD,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;IAChD,CAAC;;ACHD,IAAM,KAAK,GAAG,EAAE,CAAC;AACjB,SAAS,cAAc,KAAmB,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} //// [/src/app/module.js.map.baseline.txt] =================================================================== @@ -153,7 +143,7 @@ sourceFile:../lib/file0.ts 4 > ^^^ 5 > ^^ 6 > ^ -7 > ^^^^^^^^^^^^-> +7 > ^^^^^^^^^^^^^^-> 1 > 2 >const 3 > myGlob @@ -167,64 +157,24 @@ sourceFile:../lib/file0.ts 5 >Emitted(32, 16) Source(1, 18) + SourceIndex(0) 6 >Emitted(32, 17) Source(1, 19) + SourceIndex(0) --- ->>>function libfile0Spread() { +>>>function libfile0Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >function 3 > libfile0Spread +4 > (...b: number[]) { +5 > } 1->Emitted(33, 1) Source(2, 1) + SourceIndex(0) 2 >Emitted(33, 10) Source(2, 10) + SourceIndex(0) 3 >Emitted(33, 24) Source(2, 24) + SourceIndex(0) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(34, 5) Source(2, 25) + SourceIndex(0) -2 >Emitted(34, 16) Source(2, 39) + SourceIndex(0) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(35, 10) Source(2, 25) + SourceIndex(0) -2 >Emitted(35, 20) Source(2, 39) + SourceIndex(0) -3 >Emitted(35, 22) Source(2, 25) + SourceIndex(0) -4 >Emitted(35, 43) Source(2, 39) + SourceIndex(0) -5 >Emitted(35, 45) Source(2, 25) + SourceIndex(0) -6 >Emitted(35, 49) Source(2, 39) + SourceIndex(0) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(36, 9) Source(2, 25) + SourceIndex(0) -2 >Emitted(36, 31) Source(2, 39) + SourceIndex(0) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(38, 1) Source(2, 43) + SourceIndex(0) -2 >Emitted(38, 2) Source(2, 44) + SourceIndex(0) +4 >Emitted(33, 29) Source(2, 43) + SourceIndex(0) +5 >Emitted(33, 30) Source(2, 44) + SourceIndex(0) --- >>>libfile0Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -251,17 +201,17 @@ sourceFile:../lib/file0.ts 9 > 30 10> ] 11> ); -1->Emitted(39, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(39, 15) Source(3, 15) + SourceIndex(0) -3 >Emitted(39, 39) Source(3, 19) + SourceIndex(0) -4 >Emitted(39, 40) Source(3, 20) + SourceIndex(0) -5 >Emitted(39, 42) Source(3, 22) + SourceIndex(0) -6 >Emitted(39, 44) Source(3, 24) + SourceIndex(0) -7 >Emitted(39, 46) Source(3, 26) + SourceIndex(0) -8 >Emitted(39, 48) Source(3, 28) + SourceIndex(0) -9 >Emitted(39, 50) Source(3, 30) + SourceIndex(0) -10>Emitted(39, 51) Source(3, 31) + SourceIndex(0) -11>Emitted(39, 54) Source(3, 33) + SourceIndex(0) +1->Emitted(34, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(34, 15) Source(3, 15) + SourceIndex(0) +3 >Emitted(34, 39) Source(3, 19) + SourceIndex(0) +4 >Emitted(34, 40) Source(3, 20) + SourceIndex(0) +5 >Emitted(34, 42) Source(3, 22) + SourceIndex(0) +6 >Emitted(34, 44) Source(3, 24) + SourceIndex(0) +7 >Emitted(34, 46) Source(3, 26) + SourceIndex(0) +8 >Emitted(34, 48) Source(3, 28) + SourceIndex(0) +9 >Emitted(34, 50) Source(3, 30) + SourceIndex(0) +10>Emitted(34, 51) Source(3, 31) + SourceIndex(0) +11>Emitted(34, 54) Source(3, 33) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -285,12 +235,12 @@ sourceFile:../lib/file1.ts 4 > = 5 > 10 6 > ; -1->Emitted(44, 5) Source(1, 14) + SourceIndex(1) -2 >Emitted(44, 13) Source(1, 14) + SourceIndex(1) -3 >Emitted(44, 14) Source(1, 15) + SourceIndex(1) -4 >Emitted(44, 17) Source(1, 18) + SourceIndex(1) -5 >Emitted(44, 19) Source(1, 20) + SourceIndex(1) -6 >Emitted(44, 20) Source(1, 21) + SourceIndex(1) +1->Emitted(39, 5) Source(1, 14) + SourceIndex(1) +2 >Emitted(39, 13) Source(1, 14) + SourceIndex(1) +3 >Emitted(39, 14) Source(1, 15) + SourceIndex(1) +4 >Emitted(39, 17) Source(1, 18) + SourceIndex(1) +5 >Emitted(39, 19) Source(1, 20) + SourceIndex(1) +6 >Emitted(39, 20) Source(1, 21) + SourceIndex(1) --- >>> function forlibfile1Rest() { 1->^^^^ @@ -300,9 +250,9 @@ sourceFile:../lib/file1.ts 1-> 2 > function 3 > forlibfile1Rest -1->Emitted(45, 5) Source(1, 21) + SourceIndex(1) -2 >Emitted(45, 14) Source(1, 30) + SourceIndex(1) -3 >Emitted(45, 29) Source(1, 45) + SourceIndex(1) +1->Emitted(40, 5) Source(1, 21) + SourceIndex(1) +2 >Emitted(40, 14) Source(1, 30) + SourceIndex(1) +3 >Emitted(40, 29) Source(1, 45) + SourceIndex(1) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^^^^^ @@ -356,31 +306,31 @@ sourceFile:../lib/file1.ts 23> { b, ...rest } 24> = { a: 10, b: 30, yy: 30 } 25> ; -1->Emitted(46, 9) Source(2, 1) + SourceIndex(1) -2 >Emitted(46, 13) Source(2, 7) + SourceIndex(1) -3 >Emitted(46, 18) Source(2, 24) + SourceIndex(1) -4 >Emitted(46, 20) Source(2, 26) + SourceIndex(1) -5 >Emitted(46, 21) Source(2, 27) + SourceIndex(1) -6 >Emitted(46, 23) Source(2, 29) + SourceIndex(1) -7 >Emitted(46, 25) Source(2, 31) + SourceIndex(1) -8 >Emitted(46, 27) Source(2, 33) + SourceIndex(1) -9 >Emitted(46, 28) Source(2, 34) + SourceIndex(1) -10>Emitted(46, 30) Source(2, 36) + SourceIndex(1) -11>Emitted(46, 32) Source(2, 38) + SourceIndex(1) -12>Emitted(46, 34) Source(2, 40) + SourceIndex(1) -13>Emitted(46, 36) Source(2, 42) + SourceIndex(1) -14>Emitted(46, 38) Source(2, 44) + SourceIndex(1) -15>Emitted(46, 40) Source(2, 46) + SourceIndex(1) -16>Emitted(46, 42) Source(2, 48) + SourceIndex(1) -17>Emitted(46, 44) Source(2, 9) + SourceIndex(1) -18>Emitted(46, 45) Source(2, 10) + SourceIndex(1) -19>Emitted(46, 52) Source(2, 10) + SourceIndex(1) -20>Emitted(46, 54) Source(2, 15) + SourceIndex(1) -21>Emitted(46, 58) Source(2, 19) + SourceIndex(1) -22>Emitted(46, 72) Source(2, 7) + SourceIndex(1) -23>Emitted(46, 77) Source(2, 21) + SourceIndex(1) -24>Emitted(46, 78) Source(2, 48) + SourceIndex(1) -25>Emitted(46, 79) Source(2, 49) + SourceIndex(1) +1->Emitted(41, 9) Source(2, 1) + SourceIndex(1) +2 >Emitted(41, 13) Source(2, 7) + SourceIndex(1) +3 >Emitted(41, 18) Source(2, 24) + SourceIndex(1) +4 >Emitted(41, 20) Source(2, 26) + SourceIndex(1) +5 >Emitted(41, 21) Source(2, 27) + SourceIndex(1) +6 >Emitted(41, 23) Source(2, 29) + SourceIndex(1) +7 >Emitted(41, 25) Source(2, 31) + SourceIndex(1) +8 >Emitted(41, 27) Source(2, 33) + SourceIndex(1) +9 >Emitted(41, 28) Source(2, 34) + SourceIndex(1) +10>Emitted(41, 30) Source(2, 36) + SourceIndex(1) +11>Emitted(41, 32) Source(2, 38) + SourceIndex(1) +12>Emitted(41, 34) Source(2, 40) + SourceIndex(1) +13>Emitted(41, 36) Source(2, 42) + SourceIndex(1) +14>Emitted(41, 38) Source(2, 44) + SourceIndex(1) +15>Emitted(41, 40) Source(2, 46) + SourceIndex(1) +16>Emitted(41, 42) Source(2, 48) + SourceIndex(1) +17>Emitted(41, 44) Source(2, 9) + SourceIndex(1) +18>Emitted(41, 45) Source(2, 10) + SourceIndex(1) +19>Emitted(41, 52) Source(2, 10) + SourceIndex(1) +20>Emitted(41, 54) Source(2, 15) + SourceIndex(1) +21>Emitted(41, 58) Source(2, 19) + SourceIndex(1) +22>Emitted(41, 72) Source(2, 7) + SourceIndex(1) +23>Emitted(41, 77) Source(2, 21) + SourceIndex(1) +24>Emitted(41, 78) Source(2, 48) + SourceIndex(1) +25>Emitted(41, 79) Source(2, 49) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -389,8 +339,8 @@ sourceFile:../lib/file1.ts 1 > > 2 > } -1 >Emitted(47, 5) Source(3, 1) + SourceIndex(1) -2 >Emitted(47, 6) Source(3, 2) + SourceIndex(1) +1 >Emitted(42, 5) Source(3, 1) + SourceIndex(1) +2 >Emitted(42, 6) Source(3, 2) + SourceIndex(1) --- >>> console.log(exports.x); 1->^^^^ @@ -409,14 +359,14 @@ sourceFile:../lib/file1.ts 6 > x 7 > ) 8 > ; -1->Emitted(48, 5) Source(3, 2) + SourceIndex(1) -2 >Emitted(48, 12) Source(3, 9) + SourceIndex(1) -3 >Emitted(48, 13) Source(3, 10) + SourceIndex(1) -4 >Emitted(48, 16) Source(3, 13) + SourceIndex(1) -5 >Emitted(48, 17) Source(3, 14) + SourceIndex(1) -6 >Emitted(48, 26) Source(3, 15) + SourceIndex(1) -7 >Emitted(48, 27) Source(3, 16) + SourceIndex(1) -8 >Emitted(48, 28) Source(3, 17) + SourceIndex(1) +1->Emitted(43, 5) Source(3, 2) + SourceIndex(1) +2 >Emitted(43, 12) Source(3, 9) + SourceIndex(1) +3 >Emitted(43, 13) Source(3, 10) + SourceIndex(1) +4 >Emitted(43, 16) Source(3, 13) + SourceIndex(1) +5 >Emitted(43, 17) Source(3, 14) + SourceIndex(1) +6 >Emitted(43, 26) Source(3, 15) + SourceIndex(1) +7 >Emitted(43, 27) Source(3, 16) + SourceIndex(1) +8 >Emitted(43, 28) Source(3, 17) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -440,12 +390,12 @@ sourceFile:../lib/file2.ts 4 > = 5 > 20 6 > ; -1 >Emitted(54, 5) Source(1, 14) + SourceIndex(2) -2 >Emitted(54, 13) Source(1, 14) + SourceIndex(2) -3 >Emitted(54, 14) Source(1, 15) + SourceIndex(2) -4 >Emitted(54, 17) Source(1, 18) + SourceIndex(2) -5 >Emitted(54, 19) Source(1, 20) + SourceIndex(2) -6 >Emitted(54, 20) Source(1, 21) + SourceIndex(2) +1 >Emitted(49, 5) Source(1, 14) + SourceIndex(2) +2 >Emitted(49, 13) Source(1, 14) + SourceIndex(2) +3 >Emitted(49, 14) Source(1, 15) + SourceIndex(2) +4 >Emitted(49, 17) Source(1, 18) + SourceIndex(2) +5 >Emitted(49, 19) Source(1, 20) + SourceIndex(2) +6 >Emitted(49, 20) Source(1, 21) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -466,12 +416,12 @@ sourceFile:../lib/global.ts 4 > = 5 > 10 6 > ; -1 >Emitted(56, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(56, 5) Source(1, 7) + SourceIndex(3) -3 >Emitted(56, 16) Source(1, 18) + SourceIndex(3) -4 >Emitted(56, 19) Source(1, 21) + SourceIndex(3) -5 >Emitted(56, 21) Source(1, 23) + SourceIndex(3) -6 >Emitted(56, 22) Source(1, 24) + SourceIndex(3) +1 >Emitted(51, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(51, 5) Source(1, 7) + SourceIndex(3) +3 >Emitted(51, 16) Source(1, 18) + SourceIndex(3) +4 >Emitted(51, 19) Source(1, 21) + SourceIndex(3) +5 >Emitted(51, 21) Source(1, 23) + SourceIndex(3) +6 >Emitted(51, 22) Source(1, 24) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -495,12 +445,12 @@ sourceFile:file3.ts 4 > = 5 > 30 6 > ; -1->Emitted(61, 5) Source(1, 14) + SourceIndex(4) -2 >Emitted(61, 13) Source(1, 14) + SourceIndex(4) -3 >Emitted(61, 14) Source(1, 15) + SourceIndex(4) -4 >Emitted(61, 17) Source(1, 18) + SourceIndex(4) -5 >Emitted(61, 19) Source(1, 20) + SourceIndex(4) -6 >Emitted(61, 20) Source(1, 21) + SourceIndex(4) +1->Emitted(56, 5) Source(1, 14) + SourceIndex(4) +2 >Emitted(56, 13) Source(1, 14) + SourceIndex(4) +3 >Emitted(56, 14) Source(1, 15) + SourceIndex(4) +4 >Emitted(56, 17) Source(1, 18) + SourceIndex(4) +5 >Emitted(56, 19) Source(1, 20) + SourceIndex(4) +6 >Emitted(56, 20) Source(1, 21) + SourceIndex(4) --- >>> function forappfile3Rest() { 1->^^^^ @@ -511,9 +461,9 @@ sourceFile:file3.ts >import { x } from "file1"; 2 > function 3 > forappfile3Rest -1->Emitted(62, 5) Source(2, 27) + SourceIndex(4) -2 >Emitted(62, 14) Source(2, 36) + SourceIndex(4) -3 >Emitted(62, 29) Source(2, 51) + SourceIndex(4) +1->Emitted(57, 5) Source(2, 27) + SourceIndex(4) +2 >Emitted(57, 14) Source(2, 36) + SourceIndex(4) +3 >Emitted(57, 29) Source(2, 51) + SourceIndex(4) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^^^^^ @@ -567,31 +517,31 @@ sourceFile:file3.ts 23> { b, ...rest } 24> = { a: 10, b: 30, yy: 30 } 25> ; -1->Emitted(63, 9) Source(3, 1) + SourceIndex(4) -2 >Emitted(63, 13) Source(3, 7) + SourceIndex(4) -3 >Emitted(63, 18) Source(3, 24) + SourceIndex(4) -4 >Emitted(63, 20) Source(3, 26) + SourceIndex(4) -5 >Emitted(63, 21) Source(3, 27) + SourceIndex(4) -6 >Emitted(63, 23) Source(3, 29) + SourceIndex(4) -7 >Emitted(63, 25) Source(3, 31) + SourceIndex(4) -8 >Emitted(63, 27) Source(3, 33) + SourceIndex(4) -9 >Emitted(63, 28) Source(3, 34) + SourceIndex(4) -10>Emitted(63, 30) Source(3, 36) + SourceIndex(4) -11>Emitted(63, 32) Source(3, 38) + SourceIndex(4) -12>Emitted(63, 34) Source(3, 40) + SourceIndex(4) -13>Emitted(63, 36) Source(3, 42) + SourceIndex(4) -14>Emitted(63, 38) Source(3, 44) + SourceIndex(4) -15>Emitted(63, 40) Source(3, 46) + SourceIndex(4) -16>Emitted(63, 42) Source(3, 48) + SourceIndex(4) -17>Emitted(63, 44) Source(3, 9) + SourceIndex(4) -18>Emitted(63, 45) Source(3, 10) + SourceIndex(4) -19>Emitted(63, 52) Source(3, 10) + SourceIndex(4) -20>Emitted(63, 54) Source(3, 15) + SourceIndex(4) -21>Emitted(63, 58) Source(3, 19) + SourceIndex(4) -22>Emitted(63, 72) Source(3, 7) + SourceIndex(4) -23>Emitted(63, 77) Source(3, 21) + SourceIndex(4) -24>Emitted(63, 78) Source(3, 48) + SourceIndex(4) -25>Emitted(63, 79) Source(3, 49) + SourceIndex(4) +1->Emitted(58, 9) Source(3, 1) + SourceIndex(4) +2 >Emitted(58, 13) Source(3, 7) + SourceIndex(4) +3 >Emitted(58, 18) Source(3, 24) + SourceIndex(4) +4 >Emitted(58, 20) Source(3, 26) + SourceIndex(4) +5 >Emitted(58, 21) Source(3, 27) + SourceIndex(4) +6 >Emitted(58, 23) Source(3, 29) + SourceIndex(4) +7 >Emitted(58, 25) Source(3, 31) + SourceIndex(4) +8 >Emitted(58, 27) Source(3, 33) + SourceIndex(4) +9 >Emitted(58, 28) Source(3, 34) + SourceIndex(4) +10>Emitted(58, 30) Source(3, 36) + SourceIndex(4) +11>Emitted(58, 32) Source(3, 38) + SourceIndex(4) +12>Emitted(58, 34) Source(3, 40) + SourceIndex(4) +13>Emitted(58, 36) Source(3, 42) + SourceIndex(4) +14>Emitted(58, 38) Source(3, 44) + SourceIndex(4) +15>Emitted(58, 40) Source(3, 46) + SourceIndex(4) +16>Emitted(58, 42) Source(3, 48) + SourceIndex(4) +17>Emitted(58, 44) Source(3, 9) + SourceIndex(4) +18>Emitted(58, 45) Source(3, 10) + SourceIndex(4) +19>Emitted(58, 52) Source(3, 10) + SourceIndex(4) +20>Emitted(58, 54) Source(3, 15) + SourceIndex(4) +21>Emitted(58, 58) Source(3, 19) + SourceIndex(4) +22>Emitted(58, 72) Source(3, 7) + SourceIndex(4) +23>Emitted(58, 77) Source(3, 21) + SourceIndex(4) +24>Emitted(58, 78) Source(3, 48) + SourceIndex(4) +25>Emitted(58, 79) Source(3, 49) + SourceIndex(4) --- >>> } 1 >^^^^ @@ -599,8 +549,8 @@ sourceFile:file3.ts 1 > > 2 > } -1 >Emitted(64, 5) Source(4, 1) + SourceIndex(4) -2 >Emitted(64, 6) Source(4, 2) + SourceIndex(4) +1 >Emitted(59, 5) Source(4, 1) + SourceIndex(4) +2 >Emitted(59, 6) Source(4, 2) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -614,78 +564,38 @@ sourceFile:file4.ts 4 > ^^^ 5 > ^^ 6 > ^ -7 > ^^^^^^^^^^^^^-> +7 > ^^^^^^^^^^^^^^^-> 1 > 2 >const 3 > myVar 4 > = 5 > 30 6 > ; -1 >Emitted(66, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(66, 5) Source(1, 7) + SourceIndex(5) -3 >Emitted(66, 10) Source(1, 12) + SourceIndex(5) -4 >Emitted(66, 13) Source(1, 15) + SourceIndex(5) -5 >Emitted(66, 15) Source(1, 17) + SourceIndex(5) -6 >Emitted(66, 16) Source(1, 18) + SourceIndex(5) +1 >Emitted(61, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(61, 5) Source(1, 7) + SourceIndex(5) +3 >Emitted(61, 10) Source(1, 12) + SourceIndex(5) +4 >Emitted(61, 13) Source(1, 15) + SourceIndex(5) +5 >Emitted(61, 15) Source(1, 17) + SourceIndex(5) +6 >Emitted(61, 16) Source(1, 18) + SourceIndex(5) --- ->>>function appfile4Spread() { +>>>function appfile4Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >function 3 > appfile4Spread -1->Emitted(67, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(67, 10) Source(2, 10) + SourceIndex(5) -3 >Emitted(67, 24) Source(2, 24) + SourceIndex(5) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(68, 5) Source(2, 25) + SourceIndex(5) -2 >Emitted(68, 16) Source(2, 39) + SourceIndex(5) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(69, 10) Source(2, 25) + SourceIndex(5) -2 >Emitted(69, 20) Source(2, 39) + SourceIndex(5) -3 >Emitted(69, 22) Source(2, 25) + SourceIndex(5) -4 >Emitted(69, 43) Source(2, 39) + SourceIndex(5) -5 >Emitted(69, 45) Source(2, 25) + SourceIndex(5) -6 >Emitted(69, 49) Source(2, 39) + SourceIndex(5) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(70, 9) Source(2, 25) + SourceIndex(5) -2 >Emitted(70, 31) Source(2, 39) + SourceIndex(5) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(72, 1) Source(2, 43) + SourceIndex(5) -2 >Emitted(72, 2) Source(2, 44) + SourceIndex(5) +4 > (...b: number[]) { +5 > } +1->Emitted(62, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(62, 10) Source(2, 10) + SourceIndex(5) +3 >Emitted(62, 24) Source(2, 24) + SourceIndex(5) +4 >Emitted(62, 29) Source(2, 43) + SourceIndex(5) +5 >Emitted(62, 30) Source(2, 44) + SourceIndex(5) --- >>>appfile4Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -711,17 +621,17 @@ sourceFile:file4.ts 9 > 30 10> ] 11> ); -1->Emitted(73, 1) Source(3, 1) + SourceIndex(5) -2 >Emitted(73, 15) Source(3, 15) + SourceIndex(5) -3 >Emitted(73, 39) Source(3, 19) + SourceIndex(5) -4 >Emitted(73, 40) Source(3, 20) + SourceIndex(5) -5 >Emitted(73, 42) Source(3, 22) + SourceIndex(5) -6 >Emitted(73, 44) Source(3, 24) + SourceIndex(5) -7 >Emitted(73, 46) Source(3, 26) + SourceIndex(5) -8 >Emitted(73, 48) Source(3, 28) + SourceIndex(5) -9 >Emitted(73, 50) Source(3, 30) + SourceIndex(5) -10>Emitted(73, 51) Source(3, 31) + SourceIndex(5) -11>Emitted(73, 54) Source(3, 33) + SourceIndex(5) +1->Emitted(63, 1) Source(3, 1) + SourceIndex(5) +2 >Emitted(63, 15) Source(3, 15) + SourceIndex(5) +3 >Emitted(63, 39) Source(3, 19) + SourceIndex(5) +4 >Emitted(63, 40) Source(3, 20) + SourceIndex(5) +5 >Emitted(63, 42) Source(3, 22) + SourceIndex(5) +6 >Emitted(63, 44) Source(3, 24) + SourceIndex(5) +7 >Emitted(63, 46) Source(3, 26) + SourceIndex(5) +8 >Emitted(63, 48) Source(3, 28) + SourceIndex(5) +9 >Emitted(63, 50) Source(3, 30) + SourceIndex(5) +10>Emitted(63, 51) Source(3, 31) + SourceIndex(5) +11>Emitted(63, 54) Source(3, 33) + SourceIndex(5) --- >>>//# sourceMappingURL=module.js.map @@ -755,20 +665,20 @@ sourceFile:file4.ts }, { "pos": 1180, - "end": 1985, + "end": 1875, "kind": "prepend", "data": "../lib/module.js", "texts": [ { "pos": 1180, - "end": 1985, + "end": 1875, "kind": "text" } ] }, { - "pos": 1985, - "end": 2528, + "pos": 1875, + "end": 2308, "kind": "text" } ], @@ -847,16 +757,11 @@ var __rest = (this && this.__rest) || function (s, e) { return t; }; ---------------------------------------------------------------------- -prepend: (1180-1985):: ../lib/module.js texts:: 1 +prepend: (1180-1875):: ../lib/module.js texts:: 1 >>-------------------------------------------------------------------- -text: (1180-1985) +text: (1180-1875) var myGlob = 20; -function libfile0Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function libfile0Spread() { } libfile0Spread.apply(void 0, __spread([10, 20, 30])); define("file1", ["require", "exports"], function (require, exports) { "use strict"; @@ -877,7 +782,7 @@ define("file2", ["require", "exports"], function (require, exports) { var globalConst = 10; ---------------------------------------------------------------------- -text: (1985-2528) +text: (1875-2308) define("file3", ["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -888,12 +793,7 @@ define("file3", ["require", "exports"], function (require, exports) { } }); var myVar = 30; -function appfile4Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function appfile4Spread() { } appfile4Spread.apply(void 0, __spread([10, 20, 30])); ====================================================================== @@ -959,12 +859,7 @@ var __rest = (this && this.__rest) || function (s, e) { return t; }; var myGlob = 20; -function libfile0Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function libfile0Spread() { } libfile0Spread.apply(void 0, __spread([10, 20, 30])); define("file1", ["require", "exports"], function (require, exports) { "use strict"; @@ -986,7 +881,7 @@ var globalConst = 10; //# sourceMappingURL=module.js.map //// [/src/lib/module.js.map] -{"version":3,"file":"module.js","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;;;;;ICFnB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,SAAS,eAAe;QAC5C,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;IAChD,CAAC;IAAA,OAAO,CAAC,GAAG,CAAC,SAAC,CAAC,CAAC;;;;;;ICFH,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC"} +{"version":3,"file":"module.js","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,SAAS,cAAc,KAAmB,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;;;;;ICFnB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,SAAS,eAAe;QAC5C,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;IAChD,CAAC;IAAA,OAAO,CAAC,GAAG,CAAC,SAAC,CAAC,CAAC;;;;;;ICFH,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC"} //// [/src/lib/module.js.map.baseline.txt] =================================================================== @@ -1037,7 +932,7 @@ sourceFile:file0.ts 4 > ^^^ 5 > ^^ 6 > ^ -7 > ^^^^^^^^^^^^-> +7 > ^^^^^^^^^^^^^^-> 1 > 2 >const 3 > myGlob @@ -1051,64 +946,24 @@ sourceFile:file0.ts 5 >Emitted(32, 16) Source(1, 18) + SourceIndex(0) 6 >Emitted(32, 17) Source(1, 19) + SourceIndex(0) --- ->>>function libfile0Spread() { +>>>function libfile0Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >function 3 > libfile0Spread +4 > (...b: number[]) { +5 > } 1->Emitted(33, 1) Source(2, 1) + SourceIndex(0) 2 >Emitted(33, 10) Source(2, 10) + SourceIndex(0) 3 >Emitted(33, 24) Source(2, 24) + SourceIndex(0) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(34, 5) Source(2, 25) + SourceIndex(0) -2 >Emitted(34, 16) Source(2, 39) + SourceIndex(0) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(35, 10) Source(2, 25) + SourceIndex(0) -2 >Emitted(35, 20) Source(2, 39) + SourceIndex(0) -3 >Emitted(35, 22) Source(2, 25) + SourceIndex(0) -4 >Emitted(35, 43) Source(2, 39) + SourceIndex(0) -5 >Emitted(35, 45) Source(2, 25) + SourceIndex(0) -6 >Emitted(35, 49) Source(2, 39) + SourceIndex(0) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(36, 9) Source(2, 25) + SourceIndex(0) -2 >Emitted(36, 31) Source(2, 39) + SourceIndex(0) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(38, 1) Source(2, 43) + SourceIndex(0) -2 >Emitted(38, 2) Source(2, 44) + SourceIndex(0) +4 >Emitted(33, 29) Source(2, 43) + SourceIndex(0) +5 >Emitted(33, 30) Source(2, 44) + SourceIndex(0) --- >>>libfile0Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -1135,17 +990,17 @@ sourceFile:file0.ts 9 > 30 10> ] 11> ); -1->Emitted(39, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(39, 15) Source(3, 15) + SourceIndex(0) -3 >Emitted(39, 39) Source(3, 19) + SourceIndex(0) -4 >Emitted(39, 40) Source(3, 20) + SourceIndex(0) -5 >Emitted(39, 42) Source(3, 22) + SourceIndex(0) -6 >Emitted(39, 44) Source(3, 24) + SourceIndex(0) -7 >Emitted(39, 46) Source(3, 26) + SourceIndex(0) -8 >Emitted(39, 48) Source(3, 28) + SourceIndex(0) -9 >Emitted(39, 50) Source(3, 30) + SourceIndex(0) -10>Emitted(39, 51) Source(3, 31) + SourceIndex(0) -11>Emitted(39, 54) Source(3, 33) + SourceIndex(0) +1->Emitted(34, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(34, 15) Source(3, 15) + SourceIndex(0) +3 >Emitted(34, 39) Source(3, 19) + SourceIndex(0) +4 >Emitted(34, 40) Source(3, 20) + SourceIndex(0) +5 >Emitted(34, 42) Source(3, 22) + SourceIndex(0) +6 >Emitted(34, 44) Source(3, 24) + SourceIndex(0) +7 >Emitted(34, 46) Source(3, 26) + SourceIndex(0) +8 >Emitted(34, 48) Source(3, 28) + SourceIndex(0) +9 >Emitted(34, 50) Source(3, 30) + SourceIndex(0) +10>Emitted(34, 51) Source(3, 31) + SourceIndex(0) +11>Emitted(34, 54) Source(3, 33) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.js @@ -1169,12 +1024,12 @@ sourceFile:file1.ts 4 > = 5 > 10 6 > ; -1->Emitted(44, 5) Source(1, 14) + SourceIndex(1) -2 >Emitted(44, 13) Source(1, 14) + SourceIndex(1) -3 >Emitted(44, 14) Source(1, 15) + SourceIndex(1) -4 >Emitted(44, 17) Source(1, 18) + SourceIndex(1) -5 >Emitted(44, 19) Source(1, 20) + SourceIndex(1) -6 >Emitted(44, 20) Source(1, 21) + SourceIndex(1) +1->Emitted(39, 5) Source(1, 14) + SourceIndex(1) +2 >Emitted(39, 13) Source(1, 14) + SourceIndex(1) +3 >Emitted(39, 14) Source(1, 15) + SourceIndex(1) +4 >Emitted(39, 17) Source(1, 18) + SourceIndex(1) +5 >Emitted(39, 19) Source(1, 20) + SourceIndex(1) +6 >Emitted(39, 20) Source(1, 21) + SourceIndex(1) --- >>> function forlibfile1Rest() { 1->^^^^ @@ -1184,9 +1039,9 @@ sourceFile:file1.ts 1-> 2 > function 3 > forlibfile1Rest -1->Emitted(45, 5) Source(1, 21) + SourceIndex(1) -2 >Emitted(45, 14) Source(1, 30) + SourceIndex(1) -3 >Emitted(45, 29) Source(1, 45) + SourceIndex(1) +1->Emitted(40, 5) Source(1, 21) + SourceIndex(1) +2 >Emitted(40, 14) Source(1, 30) + SourceIndex(1) +3 >Emitted(40, 29) Source(1, 45) + SourceIndex(1) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^^^^^ @@ -1240,31 +1095,31 @@ sourceFile:file1.ts 23> { b, ...rest } 24> = { a: 10, b: 30, yy: 30 } 25> ; -1->Emitted(46, 9) Source(2, 1) + SourceIndex(1) -2 >Emitted(46, 13) Source(2, 7) + SourceIndex(1) -3 >Emitted(46, 18) Source(2, 24) + SourceIndex(1) -4 >Emitted(46, 20) Source(2, 26) + SourceIndex(1) -5 >Emitted(46, 21) Source(2, 27) + SourceIndex(1) -6 >Emitted(46, 23) Source(2, 29) + SourceIndex(1) -7 >Emitted(46, 25) Source(2, 31) + SourceIndex(1) -8 >Emitted(46, 27) Source(2, 33) + SourceIndex(1) -9 >Emitted(46, 28) Source(2, 34) + SourceIndex(1) -10>Emitted(46, 30) Source(2, 36) + SourceIndex(1) -11>Emitted(46, 32) Source(2, 38) + SourceIndex(1) -12>Emitted(46, 34) Source(2, 40) + SourceIndex(1) -13>Emitted(46, 36) Source(2, 42) + SourceIndex(1) -14>Emitted(46, 38) Source(2, 44) + SourceIndex(1) -15>Emitted(46, 40) Source(2, 46) + SourceIndex(1) -16>Emitted(46, 42) Source(2, 48) + SourceIndex(1) -17>Emitted(46, 44) Source(2, 9) + SourceIndex(1) -18>Emitted(46, 45) Source(2, 10) + SourceIndex(1) -19>Emitted(46, 52) Source(2, 10) + SourceIndex(1) -20>Emitted(46, 54) Source(2, 15) + SourceIndex(1) -21>Emitted(46, 58) Source(2, 19) + SourceIndex(1) -22>Emitted(46, 72) Source(2, 7) + SourceIndex(1) -23>Emitted(46, 77) Source(2, 21) + SourceIndex(1) -24>Emitted(46, 78) Source(2, 48) + SourceIndex(1) -25>Emitted(46, 79) Source(2, 49) + SourceIndex(1) +1->Emitted(41, 9) Source(2, 1) + SourceIndex(1) +2 >Emitted(41, 13) Source(2, 7) + SourceIndex(1) +3 >Emitted(41, 18) Source(2, 24) + SourceIndex(1) +4 >Emitted(41, 20) Source(2, 26) + SourceIndex(1) +5 >Emitted(41, 21) Source(2, 27) + SourceIndex(1) +6 >Emitted(41, 23) Source(2, 29) + SourceIndex(1) +7 >Emitted(41, 25) Source(2, 31) + SourceIndex(1) +8 >Emitted(41, 27) Source(2, 33) + SourceIndex(1) +9 >Emitted(41, 28) Source(2, 34) + SourceIndex(1) +10>Emitted(41, 30) Source(2, 36) + SourceIndex(1) +11>Emitted(41, 32) Source(2, 38) + SourceIndex(1) +12>Emitted(41, 34) Source(2, 40) + SourceIndex(1) +13>Emitted(41, 36) Source(2, 42) + SourceIndex(1) +14>Emitted(41, 38) Source(2, 44) + SourceIndex(1) +15>Emitted(41, 40) Source(2, 46) + SourceIndex(1) +16>Emitted(41, 42) Source(2, 48) + SourceIndex(1) +17>Emitted(41, 44) Source(2, 9) + SourceIndex(1) +18>Emitted(41, 45) Source(2, 10) + SourceIndex(1) +19>Emitted(41, 52) Source(2, 10) + SourceIndex(1) +20>Emitted(41, 54) Source(2, 15) + SourceIndex(1) +21>Emitted(41, 58) Source(2, 19) + SourceIndex(1) +22>Emitted(41, 72) Source(2, 7) + SourceIndex(1) +23>Emitted(41, 77) Source(2, 21) + SourceIndex(1) +24>Emitted(41, 78) Source(2, 48) + SourceIndex(1) +25>Emitted(41, 79) Source(2, 49) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -1273,8 +1128,8 @@ sourceFile:file1.ts 1 > > 2 > } -1 >Emitted(47, 5) Source(3, 1) + SourceIndex(1) -2 >Emitted(47, 6) Source(3, 2) + SourceIndex(1) +1 >Emitted(42, 5) Source(3, 1) + SourceIndex(1) +2 >Emitted(42, 6) Source(3, 2) + SourceIndex(1) --- >>> console.log(exports.x); 1->^^^^ @@ -1293,14 +1148,14 @@ sourceFile:file1.ts 6 > x 7 > ) 8 > ; -1->Emitted(48, 5) Source(3, 2) + SourceIndex(1) -2 >Emitted(48, 12) Source(3, 9) + SourceIndex(1) -3 >Emitted(48, 13) Source(3, 10) + SourceIndex(1) -4 >Emitted(48, 16) Source(3, 13) + SourceIndex(1) -5 >Emitted(48, 17) Source(3, 14) + SourceIndex(1) -6 >Emitted(48, 26) Source(3, 15) + SourceIndex(1) -7 >Emitted(48, 27) Source(3, 16) + SourceIndex(1) -8 >Emitted(48, 28) Source(3, 17) + SourceIndex(1) +1->Emitted(43, 5) Source(3, 2) + SourceIndex(1) +2 >Emitted(43, 12) Source(3, 9) + SourceIndex(1) +3 >Emitted(43, 13) Source(3, 10) + SourceIndex(1) +4 >Emitted(43, 16) Source(3, 13) + SourceIndex(1) +5 >Emitted(43, 17) Source(3, 14) + SourceIndex(1) +6 >Emitted(43, 26) Source(3, 15) + SourceIndex(1) +7 >Emitted(43, 27) Source(3, 16) + SourceIndex(1) +8 >Emitted(43, 28) Source(3, 17) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.js @@ -1324,12 +1179,12 @@ sourceFile:file2.ts 4 > = 5 > 20 6 > ; -1 >Emitted(54, 5) Source(1, 14) + SourceIndex(2) -2 >Emitted(54, 13) Source(1, 14) + SourceIndex(2) -3 >Emitted(54, 14) Source(1, 15) + SourceIndex(2) -4 >Emitted(54, 17) Source(1, 18) + SourceIndex(2) -5 >Emitted(54, 19) Source(1, 20) + SourceIndex(2) -6 >Emitted(54, 20) Source(1, 21) + SourceIndex(2) +1 >Emitted(49, 5) Source(1, 14) + SourceIndex(2) +2 >Emitted(49, 13) Source(1, 14) + SourceIndex(2) +3 >Emitted(49, 14) Source(1, 15) + SourceIndex(2) +4 >Emitted(49, 17) Source(1, 18) + SourceIndex(2) +5 >Emitted(49, 19) Source(1, 20) + SourceIndex(2) +6 >Emitted(49, 20) Source(1, 21) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.js @@ -1350,12 +1205,12 @@ sourceFile:global.ts 4 > = 5 > 10 6 > ; -1 >Emitted(56, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(56, 5) Source(1, 7) + SourceIndex(3) -3 >Emitted(56, 16) Source(1, 18) + SourceIndex(3) -4 >Emitted(56, 19) Source(1, 21) + SourceIndex(3) -5 >Emitted(56, 21) Source(1, 23) + SourceIndex(3) -6 >Emitted(56, 22) Source(1, 24) + SourceIndex(3) +1 >Emitted(51, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(51, 5) Source(1, 7) + SourceIndex(3) +3 >Emitted(51, 16) Source(1, 18) + SourceIndex(3) +4 >Emitted(51, 19) Source(1, 21) + SourceIndex(3) +5 >Emitted(51, 21) Source(1, 23) + SourceIndex(3) +6 >Emitted(51, 22) Source(1, 24) + SourceIndex(3) --- >>>//# sourceMappingURL=module.js.map @@ -1391,7 +1246,7 @@ sourceFile:global.ts }, { "pos": 1180, - "end": 1985, + "end": 1875, "kind": "text" } ], @@ -1457,14 +1312,9 @@ var __rest = (this && this.__rest) || function (s, e) { return t; }; ---------------------------------------------------------------------- -text: (1180-1985) +text: (1180-1875) var myGlob = 20; -function libfile0Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function libfile0Spread() { } libfile0Spread.apply(void 0, __spread([10, 20, 30])); define("file1", ["require", "exports"], function (require, exports) { "use strict"; diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js index 675e7469a49ef..112af54f973b4 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js @@ -56,12 +56,7 @@ var __rest = (this && this.__rest) || function (s, e) { return t; }; var myGlob = 20; -function libfile0Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function libfile0Spread() { } libfile0Spread.apply(void 0, __spread([10, 20, 30])); define("file1", ["require", "exports"], function (require, exports) { "use strict"; @@ -87,17 +82,12 @@ define("file3", ["require", "exports"], function (require, exports) { } }); var myVar = 30; -function appfile4Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function appfile4Spread() { } appfile4Spread.apply(void 0, __spread([10, 20, 30])); //# sourceMappingURL=module.js.map //// [/src/app/module.js.map] -{"version":3,"file":"module.js","sourceRoot":"","sources":["../lib/file0.ts","../lib/file1.ts","../lib/file2.ts","../lib/global.ts","file3.ts","file4.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;;;;;ICFnB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,SAAS,eAAe,KAAK,CAAC;;;;;;ICArC,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC;;;;;ICAV,QAAA,CAAC,GAAG,EAAE,CAAC;IACM,SAAS,eAAe;QAClD,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;IAChD,CAAC;;ACHD,IAAM,KAAK,GAAG,EAAE,CAAC;AACjB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} +{"version":3,"file":"module.js","sourceRoot":"","sources":["../lib/file0.ts","../lib/file1.ts","../lib/file2.ts","../lib/global.ts","file3.ts","file4.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,SAAS,cAAc,KAAmB,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;;;;;ICFnB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,SAAS,eAAe,KAAK,CAAC;;;;;;ICArC,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC;;;;;ICAV,QAAA,CAAC,GAAG,EAAE,CAAC;IACM,SAAS,eAAe;QAClD,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;IAChD,CAAC;;ACHD,IAAM,KAAK,GAAG,EAAE,CAAC;AACjB,SAAS,cAAc,KAAmB,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} //// [/src/app/module.js.map.baseline.txt] =================================================================== @@ -148,7 +138,7 @@ sourceFile:../lib/file0.ts 4 > ^^^ 5 > ^^ 6 > ^ -7 > ^^^^^^^^^^^^-> +7 > ^^^^^^^^^^^^^^-> 1 > 2 >const 3 > myGlob @@ -162,64 +152,24 @@ sourceFile:../lib/file0.ts 5 >Emitted(32, 16) Source(1, 18) + SourceIndex(0) 6 >Emitted(32, 17) Source(1, 19) + SourceIndex(0) --- ->>>function libfile0Spread() { +>>>function libfile0Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >function 3 > libfile0Spread +4 > (...b: number[]) { +5 > } 1->Emitted(33, 1) Source(2, 1) + SourceIndex(0) 2 >Emitted(33, 10) Source(2, 10) + SourceIndex(0) 3 >Emitted(33, 24) Source(2, 24) + SourceIndex(0) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(34, 5) Source(2, 25) + SourceIndex(0) -2 >Emitted(34, 16) Source(2, 39) + SourceIndex(0) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(35, 10) Source(2, 25) + SourceIndex(0) -2 >Emitted(35, 20) Source(2, 39) + SourceIndex(0) -3 >Emitted(35, 22) Source(2, 25) + SourceIndex(0) -4 >Emitted(35, 43) Source(2, 39) + SourceIndex(0) -5 >Emitted(35, 45) Source(2, 25) + SourceIndex(0) -6 >Emitted(35, 49) Source(2, 39) + SourceIndex(0) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(36, 9) Source(2, 25) + SourceIndex(0) -2 >Emitted(36, 31) Source(2, 39) + SourceIndex(0) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(38, 1) Source(2, 43) + SourceIndex(0) -2 >Emitted(38, 2) Source(2, 44) + SourceIndex(0) +4 >Emitted(33, 29) Source(2, 43) + SourceIndex(0) +5 >Emitted(33, 30) Source(2, 44) + SourceIndex(0) --- >>>libfile0Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -246,17 +196,17 @@ sourceFile:../lib/file0.ts 9 > 30 10> ] 11> ); -1->Emitted(39, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(39, 15) Source(3, 15) + SourceIndex(0) -3 >Emitted(39, 39) Source(3, 19) + SourceIndex(0) -4 >Emitted(39, 40) Source(3, 20) + SourceIndex(0) -5 >Emitted(39, 42) Source(3, 22) + SourceIndex(0) -6 >Emitted(39, 44) Source(3, 24) + SourceIndex(0) -7 >Emitted(39, 46) Source(3, 26) + SourceIndex(0) -8 >Emitted(39, 48) Source(3, 28) + SourceIndex(0) -9 >Emitted(39, 50) Source(3, 30) + SourceIndex(0) -10>Emitted(39, 51) Source(3, 31) + SourceIndex(0) -11>Emitted(39, 54) Source(3, 33) + SourceIndex(0) +1->Emitted(34, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(34, 15) Source(3, 15) + SourceIndex(0) +3 >Emitted(34, 39) Source(3, 19) + SourceIndex(0) +4 >Emitted(34, 40) Source(3, 20) + SourceIndex(0) +5 >Emitted(34, 42) Source(3, 22) + SourceIndex(0) +6 >Emitted(34, 44) Source(3, 24) + SourceIndex(0) +7 >Emitted(34, 46) Source(3, 26) + SourceIndex(0) +8 >Emitted(34, 48) Source(3, 28) + SourceIndex(0) +9 >Emitted(34, 50) Source(3, 30) + SourceIndex(0) +10>Emitted(34, 51) Source(3, 31) + SourceIndex(0) +11>Emitted(34, 54) Source(3, 33) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -280,12 +230,12 @@ sourceFile:../lib/file1.ts 4 > = 5 > 10 6 > ; -1->Emitted(44, 5) Source(1, 14) + SourceIndex(1) -2 >Emitted(44, 13) Source(1, 14) + SourceIndex(1) -3 >Emitted(44, 14) Source(1, 15) + SourceIndex(1) -4 >Emitted(44, 17) Source(1, 18) + SourceIndex(1) -5 >Emitted(44, 19) Source(1, 20) + SourceIndex(1) -6 >Emitted(44, 20) Source(1, 21) + SourceIndex(1) +1->Emitted(39, 5) Source(1, 14) + SourceIndex(1) +2 >Emitted(39, 13) Source(1, 14) + SourceIndex(1) +3 >Emitted(39, 14) Source(1, 15) + SourceIndex(1) +4 >Emitted(39, 17) Source(1, 18) + SourceIndex(1) +5 >Emitted(39, 19) Source(1, 20) + SourceIndex(1) +6 >Emitted(39, 20) Source(1, 21) + SourceIndex(1) --- >>> function forlibfile1Rest() { } 1->^^^^ @@ -298,11 +248,11 @@ sourceFile:../lib/file1.ts 3 > forlibfile1Rest 4 > () { 5 > } -1->Emitted(45, 5) Source(1, 21) + SourceIndex(1) -2 >Emitted(45, 14) Source(1, 30) + SourceIndex(1) -3 >Emitted(45, 29) Source(1, 45) + SourceIndex(1) -4 >Emitted(45, 34) Source(1, 50) + SourceIndex(1) -5 >Emitted(45, 35) Source(1, 51) + SourceIndex(1) +1->Emitted(40, 5) Source(1, 21) + SourceIndex(1) +2 >Emitted(40, 14) Source(1, 30) + SourceIndex(1) +3 >Emitted(40, 29) Source(1, 45) + SourceIndex(1) +4 >Emitted(40, 34) Source(1, 50) + SourceIndex(1) +5 >Emitted(40, 35) Source(1, 51) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -326,12 +276,12 @@ sourceFile:../lib/file2.ts 4 > = 5 > 20 6 > ; -1 >Emitted(51, 5) Source(1, 14) + SourceIndex(2) -2 >Emitted(51, 13) Source(1, 14) + SourceIndex(2) -3 >Emitted(51, 14) Source(1, 15) + SourceIndex(2) -4 >Emitted(51, 17) Source(1, 18) + SourceIndex(2) -5 >Emitted(51, 19) Source(1, 20) + SourceIndex(2) -6 >Emitted(51, 20) Source(1, 21) + SourceIndex(2) +1 >Emitted(46, 5) Source(1, 14) + SourceIndex(2) +2 >Emitted(46, 13) Source(1, 14) + SourceIndex(2) +3 >Emitted(46, 14) Source(1, 15) + SourceIndex(2) +4 >Emitted(46, 17) Source(1, 18) + SourceIndex(2) +5 >Emitted(46, 19) Source(1, 20) + SourceIndex(2) +6 >Emitted(46, 20) Source(1, 21) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -352,12 +302,12 @@ sourceFile:../lib/global.ts 4 > = 5 > 10 6 > ; -1 >Emitted(53, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(53, 5) Source(1, 7) + SourceIndex(3) -3 >Emitted(53, 16) Source(1, 18) + SourceIndex(3) -4 >Emitted(53, 19) Source(1, 21) + SourceIndex(3) -5 >Emitted(53, 21) Source(1, 23) + SourceIndex(3) -6 >Emitted(53, 22) Source(1, 24) + SourceIndex(3) +1 >Emitted(48, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(48, 5) Source(1, 7) + SourceIndex(3) +3 >Emitted(48, 16) Source(1, 18) + SourceIndex(3) +4 >Emitted(48, 19) Source(1, 21) + SourceIndex(3) +5 >Emitted(48, 21) Source(1, 23) + SourceIndex(3) +6 >Emitted(48, 22) Source(1, 24) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -381,12 +331,12 @@ sourceFile:file3.ts 4 > = 5 > 30 6 > ; -1->Emitted(58, 5) Source(1, 14) + SourceIndex(4) -2 >Emitted(58, 13) Source(1, 14) + SourceIndex(4) -3 >Emitted(58, 14) Source(1, 15) + SourceIndex(4) -4 >Emitted(58, 17) Source(1, 18) + SourceIndex(4) -5 >Emitted(58, 19) Source(1, 20) + SourceIndex(4) -6 >Emitted(58, 20) Source(1, 21) + SourceIndex(4) +1->Emitted(53, 5) Source(1, 14) + SourceIndex(4) +2 >Emitted(53, 13) Source(1, 14) + SourceIndex(4) +3 >Emitted(53, 14) Source(1, 15) + SourceIndex(4) +4 >Emitted(53, 17) Source(1, 18) + SourceIndex(4) +5 >Emitted(53, 19) Source(1, 20) + SourceIndex(4) +6 >Emitted(53, 20) Source(1, 21) + SourceIndex(4) --- >>> function forappfile3Rest() { 1->^^^^ @@ -397,9 +347,9 @@ sourceFile:file3.ts >import { x } from "file1"; 2 > function 3 > forappfile3Rest -1->Emitted(59, 5) Source(2, 27) + SourceIndex(4) -2 >Emitted(59, 14) Source(2, 36) + SourceIndex(4) -3 >Emitted(59, 29) Source(2, 51) + SourceIndex(4) +1->Emitted(54, 5) Source(2, 27) + SourceIndex(4) +2 >Emitted(54, 14) Source(2, 36) + SourceIndex(4) +3 >Emitted(54, 29) Source(2, 51) + SourceIndex(4) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^^^^^ @@ -453,31 +403,31 @@ sourceFile:file3.ts 23> { b, ...rest } 24> = { a: 10, b: 30, yy: 30 } 25> ; -1->Emitted(60, 9) Source(3, 1) + SourceIndex(4) -2 >Emitted(60, 13) Source(3, 7) + SourceIndex(4) -3 >Emitted(60, 18) Source(3, 24) + SourceIndex(4) -4 >Emitted(60, 20) Source(3, 26) + SourceIndex(4) -5 >Emitted(60, 21) Source(3, 27) + SourceIndex(4) -6 >Emitted(60, 23) Source(3, 29) + SourceIndex(4) -7 >Emitted(60, 25) Source(3, 31) + SourceIndex(4) -8 >Emitted(60, 27) Source(3, 33) + SourceIndex(4) -9 >Emitted(60, 28) Source(3, 34) + SourceIndex(4) -10>Emitted(60, 30) Source(3, 36) + SourceIndex(4) -11>Emitted(60, 32) Source(3, 38) + SourceIndex(4) -12>Emitted(60, 34) Source(3, 40) + SourceIndex(4) -13>Emitted(60, 36) Source(3, 42) + SourceIndex(4) -14>Emitted(60, 38) Source(3, 44) + SourceIndex(4) -15>Emitted(60, 40) Source(3, 46) + SourceIndex(4) -16>Emitted(60, 42) Source(3, 48) + SourceIndex(4) -17>Emitted(60, 44) Source(3, 9) + SourceIndex(4) -18>Emitted(60, 45) Source(3, 10) + SourceIndex(4) -19>Emitted(60, 52) Source(3, 10) + SourceIndex(4) -20>Emitted(60, 54) Source(3, 15) + SourceIndex(4) -21>Emitted(60, 58) Source(3, 19) + SourceIndex(4) -22>Emitted(60, 72) Source(3, 7) + SourceIndex(4) -23>Emitted(60, 77) Source(3, 21) + SourceIndex(4) -24>Emitted(60, 78) Source(3, 48) + SourceIndex(4) -25>Emitted(60, 79) Source(3, 49) + SourceIndex(4) +1->Emitted(55, 9) Source(3, 1) + SourceIndex(4) +2 >Emitted(55, 13) Source(3, 7) + SourceIndex(4) +3 >Emitted(55, 18) Source(3, 24) + SourceIndex(4) +4 >Emitted(55, 20) Source(3, 26) + SourceIndex(4) +5 >Emitted(55, 21) Source(3, 27) + SourceIndex(4) +6 >Emitted(55, 23) Source(3, 29) + SourceIndex(4) +7 >Emitted(55, 25) Source(3, 31) + SourceIndex(4) +8 >Emitted(55, 27) Source(3, 33) + SourceIndex(4) +9 >Emitted(55, 28) Source(3, 34) + SourceIndex(4) +10>Emitted(55, 30) Source(3, 36) + SourceIndex(4) +11>Emitted(55, 32) Source(3, 38) + SourceIndex(4) +12>Emitted(55, 34) Source(3, 40) + SourceIndex(4) +13>Emitted(55, 36) Source(3, 42) + SourceIndex(4) +14>Emitted(55, 38) Source(3, 44) + SourceIndex(4) +15>Emitted(55, 40) Source(3, 46) + SourceIndex(4) +16>Emitted(55, 42) Source(3, 48) + SourceIndex(4) +17>Emitted(55, 44) Source(3, 9) + SourceIndex(4) +18>Emitted(55, 45) Source(3, 10) + SourceIndex(4) +19>Emitted(55, 52) Source(3, 10) + SourceIndex(4) +20>Emitted(55, 54) Source(3, 15) + SourceIndex(4) +21>Emitted(55, 58) Source(3, 19) + SourceIndex(4) +22>Emitted(55, 72) Source(3, 7) + SourceIndex(4) +23>Emitted(55, 77) Source(3, 21) + SourceIndex(4) +24>Emitted(55, 78) Source(3, 48) + SourceIndex(4) +25>Emitted(55, 79) Source(3, 49) + SourceIndex(4) --- >>> } 1 >^^^^ @@ -485,8 +435,8 @@ sourceFile:file3.ts 1 > > 2 > } -1 >Emitted(61, 5) Source(4, 1) + SourceIndex(4) -2 >Emitted(61, 6) Source(4, 2) + SourceIndex(4) +1 >Emitted(56, 5) Source(4, 1) + SourceIndex(4) +2 >Emitted(56, 6) Source(4, 2) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -500,78 +450,38 @@ sourceFile:file4.ts 4 > ^^^ 5 > ^^ 6 > ^ -7 > ^^^^^^^^^^^^^-> +7 > ^^^^^^^^^^^^^^^-> 1 > 2 >const 3 > myVar 4 > = 5 > 30 6 > ; -1 >Emitted(63, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(63, 5) Source(1, 7) + SourceIndex(5) -3 >Emitted(63, 10) Source(1, 12) + SourceIndex(5) -4 >Emitted(63, 13) Source(1, 15) + SourceIndex(5) -5 >Emitted(63, 15) Source(1, 17) + SourceIndex(5) -6 >Emitted(63, 16) Source(1, 18) + SourceIndex(5) +1 >Emitted(58, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(58, 5) Source(1, 7) + SourceIndex(5) +3 >Emitted(58, 10) Source(1, 12) + SourceIndex(5) +4 >Emitted(58, 13) Source(1, 15) + SourceIndex(5) +5 >Emitted(58, 15) Source(1, 17) + SourceIndex(5) +6 >Emitted(58, 16) Source(1, 18) + SourceIndex(5) --- ->>>function appfile4Spread() { +>>>function appfile4Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >function 3 > appfile4Spread -1->Emitted(64, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(64, 10) Source(2, 10) + SourceIndex(5) -3 >Emitted(64, 24) Source(2, 24) + SourceIndex(5) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(65, 5) Source(2, 25) + SourceIndex(5) -2 >Emitted(65, 16) Source(2, 39) + SourceIndex(5) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(66, 10) Source(2, 25) + SourceIndex(5) -2 >Emitted(66, 20) Source(2, 39) + SourceIndex(5) -3 >Emitted(66, 22) Source(2, 25) + SourceIndex(5) -4 >Emitted(66, 43) Source(2, 39) + SourceIndex(5) -5 >Emitted(66, 45) Source(2, 25) + SourceIndex(5) -6 >Emitted(66, 49) Source(2, 39) + SourceIndex(5) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(67, 9) Source(2, 25) + SourceIndex(5) -2 >Emitted(67, 31) Source(2, 39) + SourceIndex(5) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(69, 1) Source(2, 43) + SourceIndex(5) -2 >Emitted(69, 2) Source(2, 44) + SourceIndex(5) +4 > (...b: number[]) { +5 > } +1->Emitted(59, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(59, 10) Source(2, 10) + SourceIndex(5) +3 >Emitted(59, 24) Source(2, 24) + SourceIndex(5) +4 >Emitted(59, 29) Source(2, 43) + SourceIndex(5) +5 >Emitted(59, 30) Source(2, 44) + SourceIndex(5) --- >>>appfile4Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -597,17 +507,17 @@ sourceFile:file4.ts 9 > 30 10> ] 11> ); -1->Emitted(70, 1) Source(3, 1) + SourceIndex(5) -2 >Emitted(70, 15) Source(3, 15) + SourceIndex(5) -3 >Emitted(70, 39) Source(3, 19) + SourceIndex(5) -4 >Emitted(70, 40) Source(3, 20) + SourceIndex(5) -5 >Emitted(70, 42) Source(3, 22) + SourceIndex(5) -6 >Emitted(70, 44) Source(3, 24) + SourceIndex(5) -7 >Emitted(70, 46) Source(3, 26) + SourceIndex(5) -8 >Emitted(70, 48) Source(3, 28) + SourceIndex(5) -9 >Emitted(70, 50) Source(3, 30) + SourceIndex(5) -10>Emitted(70, 51) Source(3, 31) + SourceIndex(5) -11>Emitted(70, 54) Source(3, 33) + SourceIndex(5) +1->Emitted(60, 1) Source(3, 1) + SourceIndex(5) +2 >Emitted(60, 15) Source(3, 15) + SourceIndex(5) +3 >Emitted(60, 39) Source(3, 19) + SourceIndex(5) +4 >Emitted(60, 40) Source(3, 20) + SourceIndex(5) +5 >Emitted(60, 42) Source(3, 22) + SourceIndex(5) +6 >Emitted(60, 44) Source(3, 24) + SourceIndex(5) +7 >Emitted(60, 46) Source(3, 26) + SourceIndex(5) +8 >Emitted(60, 48) Source(3, 28) + SourceIndex(5) +9 >Emitted(60, 50) Source(3, 30) + SourceIndex(5) +10>Emitted(60, 51) Source(3, 31) + SourceIndex(5) +11>Emitted(60, 54) Source(3, 33) + SourceIndex(5) --- >>>//# sourceMappingURL=module.js.map @@ -641,20 +551,20 @@ sourceFile:file4.ts }, { "pos": 1180, - "end": 1871, + "end": 1761, "kind": "prepend", "data": "../lib/module.js", "texts": [ { "pos": 1180, - "end": 1871, + "end": 1761, "kind": "text" } ] }, { - "pos": 1871, - "end": 2414, + "pos": 1761, + "end": 2194, "kind": "text" } ], @@ -733,16 +643,11 @@ var __rest = (this && this.__rest) || function (s, e) { return t; }; ---------------------------------------------------------------------- -prepend: (1180-1871):: ../lib/module.js texts:: 1 +prepend: (1180-1761):: ../lib/module.js texts:: 1 >>-------------------------------------------------------------------- -text: (1180-1871) +text: (1180-1761) var myGlob = 20; -function libfile0Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function libfile0Spread() { } libfile0Spread.apply(void 0, __spread([10, 20, 30])); define("file1", ["require", "exports"], function (require, exports) { "use strict"; @@ -760,7 +665,7 @@ define("file2", ["require", "exports"], function (require, exports) { var globalConst = 10; ---------------------------------------------------------------------- -text: (1871-2414) +text: (1761-2194) define("file3", ["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -771,12 +676,7 @@ define("file3", ["require", "exports"], function (require, exports) { } }); var myVar = 30; -function appfile4Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function appfile4Spread() { } appfile4Spread.apply(void 0, __spread([10, 20, 30])); ====================================================================== @@ -831,12 +731,7 @@ var __spread = (this && this.__spread) || function () { return ar; }; var myGlob = 20; -function libfile0Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function libfile0Spread() { } libfile0Spread.apply(void 0, __spread([10, 20, 30])); define("file1", ["require", "exports"], function (require, exports) { "use strict"; @@ -855,7 +750,7 @@ var globalConst = 10; //# sourceMappingURL=module.js.map //// [/src/lib/module.js.map] -{"version":3,"file":"module.js","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;;;;;ICFnB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,SAAS,eAAe,KAAK,CAAC;;;;;;ICArC,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC"} +{"version":3,"file":"module.js","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,SAAS,cAAc,KAAmB,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;;;;;ICFnB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,SAAS,eAAe,KAAK,CAAC;;;;;;ICArC,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC"} //// [/src/lib/module.js.map.baseline.txt] =================================================================== @@ -895,7 +790,7 @@ sourceFile:file0.ts 4 > ^^^ 5 > ^^ 6 > ^ -7 > ^^^^^^^^^^^^-> +7 > ^^^^^^^^^^^^^^-> 1 > 2 >const 3 > myGlob @@ -909,64 +804,24 @@ sourceFile:file0.ts 5 >Emitted(21, 16) Source(1, 18) + SourceIndex(0) 6 >Emitted(21, 17) Source(1, 19) + SourceIndex(0) --- ->>>function libfile0Spread() { +>>>function libfile0Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >function 3 > libfile0Spread +4 > (...b: number[]) { +5 > } 1->Emitted(22, 1) Source(2, 1) + SourceIndex(0) 2 >Emitted(22, 10) Source(2, 10) + SourceIndex(0) 3 >Emitted(22, 24) Source(2, 24) + SourceIndex(0) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(23, 5) Source(2, 25) + SourceIndex(0) -2 >Emitted(23, 16) Source(2, 39) + SourceIndex(0) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(24, 10) Source(2, 25) + SourceIndex(0) -2 >Emitted(24, 20) Source(2, 39) + SourceIndex(0) -3 >Emitted(24, 22) Source(2, 25) + SourceIndex(0) -4 >Emitted(24, 43) Source(2, 39) + SourceIndex(0) -5 >Emitted(24, 45) Source(2, 25) + SourceIndex(0) -6 >Emitted(24, 49) Source(2, 39) + SourceIndex(0) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(25, 9) Source(2, 25) + SourceIndex(0) -2 >Emitted(25, 31) Source(2, 39) + SourceIndex(0) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(27, 1) Source(2, 43) + SourceIndex(0) -2 >Emitted(27, 2) Source(2, 44) + SourceIndex(0) +4 >Emitted(22, 29) Source(2, 43) + SourceIndex(0) +5 >Emitted(22, 30) Source(2, 44) + SourceIndex(0) --- >>>libfile0Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -993,17 +848,17 @@ sourceFile:file0.ts 9 > 30 10> ] 11> ); -1->Emitted(28, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(28, 15) Source(3, 15) + SourceIndex(0) -3 >Emitted(28, 39) Source(3, 19) + SourceIndex(0) -4 >Emitted(28, 40) Source(3, 20) + SourceIndex(0) -5 >Emitted(28, 42) Source(3, 22) + SourceIndex(0) -6 >Emitted(28, 44) Source(3, 24) + SourceIndex(0) -7 >Emitted(28, 46) Source(3, 26) + SourceIndex(0) -8 >Emitted(28, 48) Source(3, 28) + SourceIndex(0) -9 >Emitted(28, 50) Source(3, 30) + SourceIndex(0) -10>Emitted(28, 51) Source(3, 31) + SourceIndex(0) -11>Emitted(28, 54) Source(3, 33) + SourceIndex(0) +1->Emitted(23, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(23, 15) Source(3, 15) + SourceIndex(0) +3 >Emitted(23, 39) Source(3, 19) + SourceIndex(0) +4 >Emitted(23, 40) Source(3, 20) + SourceIndex(0) +5 >Emitted(23, 42) Source(3, 22) + SourceIndex(0) +6 >Emitted(23, 44) Source(3, 24) + SourceIndex(0) +7 >Emitted(23, 46) Source(3, 26) + SourceIndex(0) +8 >Emitted(23, 48) Source(3, 28) + SourceIndex(0) +9 >Emitted(23, 50) Source(3, 30) + SourceIndex(0) +10>Emitted(23, 51) Source(3, 31) + SourceIndex(0) +11>Emitted(23, 54) Source(3, 33) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.js @@ -1027,12 +882,12 @@ sourceFile:file1.ts 4 > = 5 > 10 6 > ; -1->Emitted(33, 5) Source(1, 14) + SourceIndex(1) -2 >Emitted(33, 13) Source(1, 14) + SourceIndex(1) -3 >Emitted(33, 14) Source(1, 15) + SourceIndex(1) -4 >Emitted(33, 17) Source(1, 18) + SourceIndex(1) -5 >Emitted(33, 19) Source(1, 20) + SourceIndex(1) -6 >Emitted(33, 20) Source(1, 21) + SourceIndex(1) +1->Emitted(28, 5) Source(1, 14) + SourceIndex(1) +2 >Emitted(28, 13) Source(1, 14) + SourceIndex(1) +3 >Emitted(28, 14) Source(1, 15) + SourceIndex(1) +4 >Emitted(28, 17) Source(1, 18) + SourceIndex(1) +5 >Emitted(28, 19) Source(1, 20) + SourceIndex(1) +6 >Emitted(28, 20) Source(1, 21) + SourceIndex(1) --- >>> function forlibfile1Rest() { } 1->^^^^ @@ -1045,11 +900,11 @@ sourceFile:file1.ts 3 > forlibfile1Rest 4 > () { 5 > } -1->Emitted(34, 5) Source(1, 21) + SourceIndex(1) -2 >Emitted(34, 14) Source(1, 30) + SourceIndex(1) -3 >Emitted(34, 29) Source(1, 45) + SourceIndex(1) -4 >Emitted(34, 34) Source(1, 50) + SourceIndex(1) -5 >Emitted(34, 35) Source(1, 51) + SourceIndex(1) +1->Emitted(29, 5) Source(1, 21) + SourceIndex(1) +2 >Emitted(29, 14) Source(1, 30) + SourceIndex(1) +3 >Emitted(29, 29) Source(1, 45) + SourceIndex(1) +4 >Emitted(29, 34) Source(1, 50) + SourceIndex(1) +5 >Emitted(29, 35) Source(1, 51) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.js @@ -1073,12 +928,12 @@ sourceFile:file2.ts 4 > = 5 > 20 6 > ; -1 >Emitted(40, 5) Source(1, 14) + SourceIndex(2) -2 >Emitted(40, 13) Source(1, 14) + SourceIndex(2) -3 >Emitted(40, 14) Source(1, 15) + SourceIndex(2) -4 >Emitted(40, 17) Source(1, 18) + SourceIndex(2) -5 >Emitted(40, 19) Source(1, 20) + SourceIndex(2) -6 >Emitted(40, 20) Source(1, 21) + SourceIndex(2) +1 >Emitted(35, 5) Source(1, 14) + SourceIndex(2) +2 >Emitted(35, 13) Source(1, 14) + SourceIndex(2) +3 >Emitted(35, 14) Source(1, 15) + SourceIndex(2) +4 >Emitted(35, 17) Source(1, 18) + SourceIndex(2) +5 >Emitted(35, 19) Source(1, 20) + SourceIndex(2) +6 >Emitted(35, 20) Source(1, 21) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.js @@ -1099,12 +954,12 @@ sourceFile:global.ts 4 > = 5 > 10 6 > ; -1 >Emitted(42, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(42, 5) Source(1, 7) + SourceIndex(3) -3 >Emitted(42, 16) Source(1, 18) + SourceIndex(3) -4 >Emitted(42, 19) Source(1, 21) + SourceIndex(3) -5 >Emitted(42, 21) Source(1, 23) + SourceIndex(3) -6 >Emitted(42, 22) Source(1, 24) + SourceIndex(3) +1 >Emitted(37, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(37, 5) Source(1, 7) + SourceIndex(3) +3 >Emitted(37, 16) Source(1, 18) + SourceIndex(3) +4 >Emitted(37, 19) Source(1, 21) + SourceIndex(3) +5 >Emitted(37, 21) Source(1, 23) + SourceIndex(3) +6 >Emitted(37, 22) Source(1, 24) + SourceIndex(3) --- >>>//# sourceMappingURL=module.js.map @@ -1134,7 +989,7 @@ sourceFile:global.ts }, { "pos": 678, - "end": 1369, + "end": 1259, "kind": "text" } ], @@ -1186,14 +1041,9 @@ var __spread = (this && this.__spread) || function () { return ar; }; ---------------------------------------------------------------------- -text: (678-1369) +text: (678-1259) var myGlob = 20; -function libfile0Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function libfile0Spread() { } libfile0Spread.apply(void 0, __spread([10, 20, 30])); define("file1", ["require", "exports"], function (require, exports) { "use strict"; diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/multiple-emitHelpers-in-all-projects.js index 893b4c37771f0..b37a772aa1e66 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/multiple-emitHelpers-in-all-projects.js @@ -377,12 +377,7 @@ var __rest = (this && this.__rest) || function (s, e) { return t; }; var myGlob = 20; -function libfile0Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function libfile0Spread() { } libfile0Spread.apply(void 0, __spread([10, 20, 30])); define("file1", ["require", "exports"], function (require, exports) { "use strict"; @@ -410,17 +405,12 @@ define("file3", ["require", "exports"], function (require, exports) { } }); var myVar = 30; -function appfile4Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function appfile4Spread() { } appfile4Spread.apply(void 0, __spread([10, 20, 30])); //# sourceMappingURL=module.js.map //// [/src/app/module.js.map] -{"version":3,"file":"module.js","sourceRoot":"","sources":["../lib/file0.ts","../lib/file1.ts","../lib/file2.ts","../lib/global.ts","file3.ts","file4.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;;;;;ICFnB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,SAAS,eAAe;QAC5C,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;IAChD,CAAC;;;;;;ICFY,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC;;;;;ICAV,QAAA,CAAC,GAAG,EAAE,CAAC;IACM,SAAS,eAAe;QAClD,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;IAChD,CAAC;;ACHD,IAAM,KAAK,GAAG,EAAE,CAAC;AACjB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} +{"version":3,"file":"module.js","sourceRoot":"","sources":["../lib/file0.ts","../lib/file1.ts","../lib/file2.ts","../lib/global.ts","file3.ts","file4.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,SAAS,cAAc,KAAmB,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;;;;;ICFnB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,SAAS,eAAe;QAC5C,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;IAChD,CAAC;;;;;;ICFY,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC;;;;;ICAV,QAAA,CAAC,GAAG,EAAE,CAAC;IACM,SAAS,eAAe;QAClD,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;IAChD,CAAC;;ACHD,IAAM,KAAK,GAAG,EAAE,CAAC;AACjB,SAAS,cAAc,KAAmB,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} //// [/src/app/module.js.map.baseline.txt] =================================================================== @@ -471,7 +461,7 @@ sourceFile:../lib/file0.ts 4 > ^^^ 5 > ^^ 6 > ^ -7 > ^^^^^^^^^^^^-> +7 > ^^^^^^^^^^^^^^-> 1 > 2 >const 3 > myGlob @@ -485,64 +475,24 @@ sourceFile:../lib/file0.ts 5 >Emitted(32, 16) Source(1, 18) + SourceIndex(0) 6 >Emitted(32, 17) Source(1, 19) + SourceIndex(0) --- ->>>function libfile0Spread() { +>>>function libfile0Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >function 3 > libfile0Spread +4 > (...b: number[]) { +5 > } 1->Emitted(33, 1) Source(2, 1) + SourceIndex(0) 2 >Emitted(33, 10) Source(2, 10) + SourceIndex(0) 3 >Emitted(33, 24) Source(2, 24) + SourceIndex(0) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(34, 5) Source(2, 25) + SourceIndex(0) -2 >Emitted(34, 16) Source(2, 39) + SourceIndex(0) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(35, 10) Source(2, 25) + SourceIndex(0) -2 >Emitted(35, 20) Source(2, 39) + SourceIndex(0) -3 >Emitted(35, 22) Source(2, 25) + SourceIndex(0) -4 >Emitted(35, 43) Source(2, 39) + SourceIndex(0) -5 >Emitted(35, 45) Source(2, 25) + SourceIndex(0) -6 >Emitted(35, 49) Source(2, 39) + SourceIndex(0) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(36, 9) Source(2, 25) + SourceIndex(0) -2 >Emitted(36, 31) Source(2, 39) + SourceIndex(0) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(38, 1) Source(2, 43) + SourceIndex(0) -2 >Emitted(38, 2) Source(2, 44) + SourceIndex(0) +4 >Emitted(33, 29) Source(2, 43) + SourceIndex(0) +5 >Emitted(33, 30) Source(2, 44) + SourceIndex(0) --- >>>libfile0Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -569,17 +519,17 @@ sourceFile:../lib/file0.ts 9 > 30 10> ] 11> ); -1->Emitted(39, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(39, 15) Source(3, 15) + SourceIndex(0) -3 >Emitted(39, 39) Source(3, 19) + SourceIndex(0) -4 >Emitted(39, 40) Source(3, 20) + SourceIndex(0) -5 >Emitted(39, 42) Source(3, 22) + SourceIndex(0) -6 >Emitted(39, 44) Source(3, 24) + SourceIndex(0) -7 >Emitted(39, 46) Source(3, 26) + SourceIndex(0) -8 >Emitted(39, 48) Source(3, 28) + SourceIndex(0) -9 >Emitted(39, 50) Source(3, 30) + SourceIndex(0) -10>Emitted(39, 51) Source(3, 31) + SourceIndex(0) -11>Emitted(39, 54) Source(3, 33) + SourceIndex(0) +1->Emitted(34, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(34, 15) Source(3, 15) + SourceIndex(0) +3 >Emitted(34, 39) Source(3, 19) + SourceIndex(0) +4 >Emitted(34, 40) Source(3, 20) + SourceIndex(0) +5 >Emitted(34, 42) Source(3, 22) + SourceIndex(0) +6 >Emitted(34, 44) Source(3, 24) + SourceIndex(0) +7 >Emitted(34, 46) Source(3, 26) + SourceIndex(0) +8 >Emitted(34, 48) Source(3, 28) + SourceIndex(0) +9 >Emitted(34, 50) Source(3, 30) + SourceIndex(0) +10>Emitted(34, 51) Source(3, 31) + SourceIndex(0) +11>Emitted(34, 54) Source(3, 33) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -603,12 +553,12 @@ sourceFile:../lib/file1.ts 4 > = 5 > 10 6 > ; -1->Emitted(44, 5) Source(1, 14) + SourceIndex(1) -2 >Emitted(44, 13) Source(1, 14) + SourceIndex(1) -3 >Emitted(44, 14) Source(1, 15) + SourceIndex(1) -4 >Emitted(44, 17) Source(1, 18) + SourceIndex(1) -5 >Emitted(44, 19) Source(1, 20) + SourceIndex(1) -6 >Emitted(44, 20) Source(1, 21) + SourceIndex(1) +1->Emitted(39, 5) Source(1, 14) + SourceIndex(1) +2 >Emitted(39, 13) Source(1, 14) + SourceIndex(1) +3 >Emitted(39, 14) Source(1, 15) + SourceIndex(1) +4 >Emitted(39, 17) Source(1, 18) + SourceIndex(1) +5 >Emitted(39, 19) Source(1, 20) + SourceIndex(1) +6 >Emitted(39, 20) Source(1, 21) + SourceIndex(1) --- >>> function forlibfile1Rest() { 1->^^^^ @@ -618,9 +568,9 @@ sourceFile:../lib/file1.ts 1-> 2 > function 3 > forlibfile1Rest -1->Emitted(45, 5) Source(1, 21) + SourceIndex(1) -2 >Emitted(45, 14) Source(1, 30) + SourceIndex(1) -3 >Emitted(45, 29) Source(1, 45) + SourceIndex(1) +1->Emitted(40, 5) Source(1, 21) + SourceIndex(1) +2 >Emitted(40, 14) Source(1, 30) + SourceIndex(1) +3 >Emitted(40, 29) Source(1, 45) + SourceIndex(1) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^^^^^ @@ -674,31 +624,31 @@ sourceFile:../lib/file1.ts 23> { b, ...rest } 24> = { a: 10, b: 30, yy: 30 } 25> ; -1->Emitted(46, 9) Source(2, 1) + SourceIndex(1) -2 >Emitted(46, 13) Source(2, 7) + SourceIndex(1) -3 >Emitted(46, 18) Source(2, 24) + SourceIndex(1) -4 >Emitted(46, 20) Source(2, 26) + SourceIndex(1) -5 >Emitted(46, 21) Source(2, 27) + SourceIndex(1) -6 >Emitted(46, 23) Source(2, 29) + SourceIndex(1) -7 >Emitted(46, 25) Source(2, 31) + SourceIndex(1) -8 >Emitted(46, 27) Source(2, 33) + SourceIndex(1) -9 >Emitted(46, 28) Source(2, 34) + SourceIndex(1) -10>Emitted(46, 30) Source(2, 36) + SourceIndex(1) -11>Emitted(46, 32) Source(2, 38) + SourceIndex(1) -12>Emitted(46, 34) Source(2, 40) + SourceIndex(1) -13>Emitted(46, 36) Source(2, 42) + SourceIndex(1) -14>Emitted(46, 38) Source(2, 44) + SourceIndex(1) -15>Emitted(46, 40) Source(2, 46) + SourceIndex(1) -16>Emitted(46, 42) Source(2, 48) + SourceIndex(1) -17>Emitted(46, 44) Source(2, 9) + SourceIndex(1) -18>Emitted(46, 45) Source(2, 10) + SourceIndex(1) -19>Emitted(46, 52) Source(2, 10) + SourceIndex(1) -20>Emitted(46, 54) Source(2, 15) + SourceIndex(1) -21>Emitted(46, 58) Source(2, 19) + SourceIndex(1) -22>Emitted(46, 72) Source(2, 7) + SourceIndex(1) -23>Emitted(46, 77) Source(2, 21) + SourceIndex(1) -24>Emitted(46, 78) Source(2, 48) + SourceIndex(1) -25>Emitted(46, 79) Source(2, 49) + SourceIndex(1) +1->Emitted(41, 9) Source(2, 1) + SourceIndex(1) +2 >Emitted(41, 13) Source(2, 7) + SourceIndex(1) +3 >Emitted(41, 18) Source(2, 24) + SourceIndex(1) +4 >Emitted(41, 20) Source(2, 26) + SourceIndex(1) +5 >Emitted(41, 21) Source(2, 27) + SourceIndex(1) +6 >Emitted(41, 23) Source(2, 29) + SourceIndex(1) +7 >Emitted(41, 25) Source(2, 31) + SourceIndex(1) +8 >Emitted(41, 27) Source(2, 33) + SourceIndex(1) +9 >Emitted(41, 28) Source(2, 34) + SourceIndex(1) +10>Emitted(41, 30) Source(2, 36) + SourceIndex(1) +11>Emitted(41, 32) Source(2, 38) + SourceIndex(1) +12>Emitted(41, 34) Source(2, 40) + SourceIndex(1) +13>Emitted(41, 36) Source(2, 42) + SourceIndex(1) +14>Emitted(41, 38) Source(2, 44) + SourceIndex(1) +15>Emitted(41, 40) Source(2, 46) + SourceIndex(1) +16>Emitted(41, 42) Source(2, 48) + SourceIndex(1) +17>Emitted(41, 44) Source(2, 9) + SourceIndex(1) +18>Emitted(41, 45) Source(2, 10) + SourceIndex(1) +19>Emitted(41, 52) Source(2, 10) + SourceIndex(1) +20>Emitted(41, 54) Source(2, 15) + SourceIndex(1) +21>Emitted(41, 58) Source(2, 19) + SourceIndex(1) +22>Emitted(41, 72) Source(2, 7) + SourceIndex(1) +23>Emitted(41, 77) Source(2, 21) + SourceIndex(1) +24>Emitted(41, 78) Source(2, 48) + SourceIndex(1) +25>Emitted(41, 79) Source(2, 49) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -706,8 +656,8 @@ sourceFile:../lib/file1.ts 1 > > 2 > } -1 >Emitted(47, 5) Source(3, 1) + SourceIndex(1) -2 >Emitted(47, 6) Source(3, 2) + SourceIndex(1) +1 >Emitted(42, 5) Source(3, 1) + SourceIndex(1) +2 >Emitted(42, 6) Source(3, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -731,12 +681,12 @@ sourceFile:../lib/file2.ts 4 > = 5 > 20 6 > ; -1 >Emitted(53, 5) Source(1, 14) + SourceIndex(2) -2 >Emitted(53, 13) Source(1, 14) + SourceIndex(2) -3 >Emitted(53, 14) Source(1, 15) + SourceIndex(2) -4 >Emitted(53, 17) Source(1, 18) + SourceIndex(2) -5 >Emitted(53, 19) Source(1, 20) + SourceIndex(2) -6 >Emitted(53, 20) Source(1, 21) + SourceIndex(2) +1 >Emitted(48, 5) Source(1, 14) + SourceIndex(2) +2 >Emitted(48, 13) Source(1, 14) + SourceIndex(2) +3 >Emitted(48, 14) Source(1, 15) + SourceIndex(2) +4 >Emitted(48, 17) Source(1, 18) + SourceIndex(2) +5 >Emitted(48, 19) Source(1, 20) + SourceIndex(2) +6 >Emitted(48, 20) Source(1, 21) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -757,12 +707,12 @@ sourceFile:../lib/global.ts 4 > = 5 > 10 6 > ; -1 >Emitted(55, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(55, 5) Source(1, 7) + SourceIndex(3) -3 >Emitted(55, 16) Source(1, 18) + SourceIndex(3) -4 >Emitted(55, 19) Source(1, 21) + SourceIndex(3) -5 >Emitted(55, 21) Source(1, 23) + SourceIndex(3) -6 >Emitted(55, 22) Source(1, 24) + SourceIndex(3) +1 >Emitted(50, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(50, 5) Source(1, 7) + SourceIndex(3) +3 >Emitted(50, 16) Source(1, 18) + SourceIndex(3) +4 >Emitted(50, 19) Source(1, 21) + SourceIndex(3) +5 >Emitted(50, 21) Source(1, 23) + SourceIndex(3) +6 >Emitted(50, 22) Source(1, 24) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -786,12 +736,12 @@ sourceFile:file3.ts 4 > = 5 > 30 6 > ; -1->Emitted(60, 5) Source(1, 14) + SourceIndex(4) -2 >Emitted(60, 13) Source(1, 14) + SourceIndex(4) -3 >Emitted(60, 14) Source(1, 15) + SourceIndex(4) -4 >Emitted(60, 17) Source(1, 18) + SourceIndex(4) -5 >Emitted(60, 19) Source(1, 20) + SourceIndex(4) -6 >Emitted(60, 20) Source(1, 21) + SourceIndex(4) +1->Emitted(55, 5) Source(1, 14) + SourceIndex(4) +2 >Emitted(55, 13) Source(1, 14) + SourceIndex(4) +3 >Emitted(55, 14) Source(1, 15) + SourceIndex(4) +4 >Emitted(55, 17) Source(1, 18) + SourceIndex(4) +5 >Emitted(55, 19) Source(1, 20) + SourceIndex(4) +6 >Emitted(55, 20) Source(1, 21) + SourceIndex(4) --- >>> function forappfile3Rest() { 1->^^^^ @@ -802,9 +752,9 @@ sourceFile:file3.ts >import { x } from "file1"; 2 > function 3 > forappfile3Rest -1->Emitted(61, 5) Source(2, 27) + SourceIndex(4) -2 >Emitted(61, 14) Source(2, 36) + SourceIndex(4) -3 >Emitted(61, 29) Source(2, 51) + SourceIndex(4) +1->Emitted(56, 5) Source(2, 27) + SourceIndex(4) +2 >Emitted(56, 14) Source(2, 36) + SourceIndex(4) +3 >Emitted(56, 29) Source(2, 51) + SourceIndex(4) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^^^^^ @@ -858,31 +808,31 @@ sourceFile:file3.ts 23> { b, ...rest } 24> = { a: 10, b: 30, yy: 30 } 25> ; -1->Emitted(62, 9) Source(3, 1) + SourceIndex(4) -2 >Emitted(62, 13) Source(3, 7) + SourceIndex(4) -3 >Emitted(62, 18) Source(3, 24) + SourceIndex(4) -4 >Emitted(62, 20) Source(3, 26) + SourceIndex(4) -5 >Emitted(62, 21) Source(3, 27) + SourceIndex(4) -6 >Emitted(62, 23) Source(3, 29) + SourceIndex(4) -7 >Emitted(62, 25) Source(3, 31) + SourceIndex(4) -8 >Emitted(62, 27) Source(3, 33) + SourceIndex(4) -9 >Emitted(62, 28) Source(3, 34) + SourceIndex(4) -10>Emitted(62, 30) Source(3, 36) + SourceIndex(4) -11>Emitted(62, 32) Source(3, 38) + SourceIndex(4) -12>Emitted(62, 34) Source(3, 40) + SourceIndex(4) -13>Emitted(62, 36) Source(3, 42) + SourceIndex(4) -14>Emitted(62, 38) Source(3, 44) + SourceIndex(4) -15>Emitted(62, 40) Source(3, 46) + SourceIndex(4) -16>Emitted(62, 42) Source(3, 48) + SourceIndex(4) -17>Emitted(62, 44) Source(3, 9) + SourceIndex(4) -18>Emitted(62, 45) Source(3, 10) + SourceIndex(4) -19>Emitted(62, 52) Source(3, 10) + SourceIndex(4) -20>Emitted(62, 54) Source(3, 15) + SourceIndex(4) -21>Emitted(62, 58) Source(3, 19) + SourceIndex(4) -22>Emitted(62, 72) Source(3, 7) + SourceIndex(4) -23>Emitted(62, 77) Source(3, 21) + SourceIndex(4) -24>Emitted(62, 78) Source(3, 48) + SourceIndex(4) -25>Emitted(62, 79) Source(3, 49) + SourceIndex(4) +1->Emitted(57, 9) Source(3, 1) + SourceIndex(4) +2 >Emitted(57, 13) Source(3, 7) + SourceIndex(4) +3 >Emitted(57, 18) Source(3, 24) + SourceIndex(4) +4 >Emitted(57, 20) Source(3, 26) + SourceIndex(4) +5 >Emitted(57, 21) Source(3, 27) + SourceIndex(4) +6 >Emitted(57, 23) Source(3, 29) + SourceIndex(4) +7 >Emitted(57, 25) Source(3, 31) + SourceIndex(4) +8 >Emitted(57, 27) Source(3, 33) + SourceIndex(4) +9 >Emitted(57, 28) Source(3, 34) + SourceIndex(4) +10>Emitted(57, 30) Source(3, 36) + SourceIndex(4) +11>Emitted(57, 32) Source(3, 38) + SourceIndex(4) +12>Emitted(57, 34) Source(3, 40) + SourceIndex(4) +13>Emitted(57, 36) Source(3, 42) + SourceIndex(4) +14>Emitted(57, 38) Source(3, 44) + SourceIndex(4) +15>Emitted(57, 40) Source(3, 46) + SourceIndex(4) +16>Emitted(57, 42) Source(3, 48) + SourceIndex(4) +17>Emitted(57, 44) Source(3, 9) + SourceIndex(4) +18>Emitted(57, 45) Source(3, 10) + SourceIndex(4) +19>Emitted(57, 52) Source(3, 10) + SourceIndex(4) +20>Emitted(57, 54) Source(3, 15) + SourceIndex(4) +21>Emitted(57, 58) Source(3, 19) + SourceIndex(4) +22>Emitted(57, 72) Source(3, 7) + SourceIndex(4) +23>Emitted(57, 77) Source(3, 21) + SourceIndex(4) +24>Emitted(57, 78) Source(3, 48) + SourceIndex(4) +25>Emitted(57, 79) Source(3, 49) + SourceIndex(4) --- >>> } 1 >^^^^ @@ -890,8 +840,8 @@ sourceFile:file3.ts 1 > > 2 > } -1 >Emitted(63, 5) Source(4, 1) + SourceIndex(4) -2 >Emitted(63, 6) Source(4, 2) + SourceIndex(4) +1 >Emitted(58, 5) Source(4, 1) + SourceIndex(4) +2 >Emitted(58, 6) Source(4, 2) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -905,78 +855,38 @@ sourceFile:file4.ts 4 > ^^^ 5 > ^^ 6 > ^ -7 > ^^^^^^^^^^^^^-> +7 > ^^^^^^^^^^^^^^^-> 1 > 2 >const 3 > myVar 4 > = 5 > 30 6 > ; -1 >Emitted(65, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(65, 5) Source(1, 7) + SourceIndex(5) -3 >Emitted(65, 10) Source(1, 12) + SourceIndex(5) -4 >Emitted(65, 13) Source(1, 15) + SourceIndex(5) -5 >Emitted(65, 15) Source(1, 17) + SourceIndex(5) -6 >Emitted(65, 16) Source(1, 18) + SourceIndex(5) +1 >Emitted(60, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(60, 5) Source(1, 7) + SourceIndex(5) +3 >Emitted(60, 10) Source(1, 12) + SourceIndex(5) +4 >Emitted(60, 13) Source(1, 15) + SourceIndex(5) +5 >Emitted(60, 15) Source(1, 17) + SourceIndex(5) +6 >Emitted(60, 16) Source(1, 18) + SourceIndex(5) --- ->>>function appfile4Spread() { +>>>function appfile4Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >function 3 > appfile4Spread -1->Emitted(66, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(66, 10) Source(2, 10) + SourceIndex(5) -3 >Emitted(66, 24) Source(2, 24) + SourceIndex(5) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(67, 5) Source(2, 25) + SourceIndex(5) -2 >Emitted(67, 16) Source(2, 39) + SourceIndex(5) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(68, 10) Source(2, 25) + SourceIndex(5) -2 >Emitted(68, 20) Source(2, 39) + SourceIndex(5) -3 >Emitted(68, 22) Source(2, 25) + SourceIndex(5) -4 >Emitted(68, 43) Source(2, 39) + SourceIndex(5) -5 >Emitted(68, 45) Source(2, 25) + SourceIndex(5) -6 >Emitted(68, 49) Source(2, 39) + SourceIndex(5) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(69, 9) Source(2, 25) + SourceIndex(5) -2 >Emitted(69, 31) Source(2, 39) + SourceIndex(5) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(71, 1) Source(2, 43) + SourceIndex(5) -2 >Emitted(71, 2) Source(2, 44) + SourceIndex(5) +4 > (...b: number[]) { +5 > } +1->Emitted(61, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(61, 10) Source(2, 10) + SourceIndex(5) +3 >Emitted(61, 24) Source(2, 24) + SourceIndex(5) +4 >Emitted(61, 29) Source(2, 43) + SourceIndex(5) +5 >Emitted(61, 30) Source(2, 44) + SourceIndex(5) --- >>>appfile4Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -1002,17 +912,17 @@ sourceFile:file4.ts 9 > 30 10> ] 11> ); -1->Emitted(72, 1) Source(3, 1) + SourceIndex(5) -2 >Emitted(72, 15) Source(3, 15) + SourceIndex(5) -3 >Emitted(72, 39) Source(3, 19) + SourceIndex(5) -4 >Emitted(72, 40) Source(3, 20) + SourceIndex(5) -5 >Emitted(72, 42) Source(3, 22) + SourceIndex(5) -6 >Emitted(72, 44) Source(3, 24) + SourceIndex(5) -7 >Emitted(72, 46) Source(3, 26) + SourceIndex(5) -8 >Emitted(72, 48) Source(3, 28) + SourceIndex(5) -9 >Emitted(72, 50) Source(3, 30) + SourceIndex(5) -10>Emitted(72, 51) Source(3, 31) + SourceIndex(5) -11>Emitted(72, 54) Source(3, 33) + SourceIndex(5) +1->Emitted(62, 1) Source(3, 1) + SourceIndex(5) +2 >Emitted(62, 15) Source(3, 15) + SourceIndex(5) +3 >Emitted(62, 39) Source(3, 19) + SourceIndex(5) +4 >Emitted(62, 40) Source(3, 20) + SourceIndex(5) +5 >Emitted(62, 42) Source(3, 22) + SourceIndex(5) +6 >Emitted(62, 44) Source(3, 24) + SourceIndex(5) +7 >Emitted(62, 46) Source(3, 26) + SourceIndex(5) +8 >Emitted(62, 48) Source(3, 28) + SourceIndex(5) +9 >Emitted(62, 50) Source(3, 30) + SourceIndex(5) +10>Emitted(62, 51) Source(3, 31) + SourceIndex(5) +11>Emitted(62, 54) Source(3, 33) + SourceIndex(5) --- >>>//# sourceMappingURL=module.js.map @@ -1046,20 +956,20 @@ sourceFile:file4.ts }, { "pos": 1180, - "end": 1956, + "end": 1846, "kind": "prepend", "data": "../lib/module.js", "texts": [ { "pos": 1180, - "end": 1956, + "end": 1846, "kind": "text" } ] }, { - "pos": 1956, - "end": 2499, + "pos": 1846, + "end": 2279, "kind": "text" } ], @@ -1138,16 +1048,11 @@ var __rest = (this && this.__rest) || function (s, e) { return t; }; ---------------------------------------------------------------------- -prepend: (1180-1956):: ../lib/module.js texts:: 1 +prepend: (1180-1846):: ../lib/module.js texts:: 1 >>-------------------------------------------------------------------- -text: (1180-1956) +text: (1180-1846) var myGlob = 20; -function libfile0Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function libfile0Spread() { } libfile0Spread.apply(void 0, __spread([10, 20, 30])); define("file1", ["require", "exports"], function (require, exports) { "use strict"; @@ -1167,7 +1072,7 @@ define("file2", ["require", "exports"], function (require, exports) { var globalConst = 10; ---------------------------------------------------------------------- -text: (1956-2499) +text: (1846-2279) define("file3", ["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -1178,12 +1083,7 @@ define("file3", ["require", "exports"], function (require, exports) { } }); var myVar = 30; -function appfile4Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function appfile4Spread() { } appfile4Spread.apply(void 0, __spread([10, 20, 30])); ====================================================================== @@ -1408,12 +1308,7 @@ var __rest = (this && this.__rest) || function (s, e) { return t; }; var myGlob = 20; -function libfile0Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function libfile0Spread() { } libfile0Spread.apply(void 0, __spread([10, 20, 30])); define("file1", ["require", "exports"], function (require, exports) { "use strict"; @@ -1434,7 +1329,7 @@ var globalConst = 10; //# sourceMappingURL=module.js.map //// [/src/lib/module.js.map] -{"version":3,"file":"module.js","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;;;;;ICFnB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,SAAS,eAAe;QAC5C,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;IAChD,CAAC;;;;;;ICFY,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC"} +{"version":3,"file":"module.js","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,SAAS,cAAc,KAAmB,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;;;;;ICFnB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,SAAS,eAAe;QAC5C,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;IAChD,CAAC;;;;;;ICFY,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC"} //// [/src/lib/module.js.map.baseline.txt] =================================================================== @@ -1485,7 +1380,7 @@ sourceFile:file0.ts 4 > ^^^ 5 > ^^ 6 > ^ -7 > ^^^^^^^^^^^^-> +7 > ^^^^^^^^^^^^^^-> 1 > 2 >const 3 > myGlob @@ -1499,64 +1394,24 @@ sourceFile:file0.ts 5 >Emitted(32, 16) Source(1, 18) + SourceIndex(0) 6 >Emitted(32, 17) Source(1, 19) + SourceIndex(0) --- ->>>function libfile0Spread() { +>>>function libfile0Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >function 3 > libfile0Spread +4 > (...b: number[]) { +5 > } 1->Emitted(33, 1) Source(2, 1) + SourceIndex(0) 2 >Emitted(33, 10) Source(2, 10) + SourceIndex(0) 3 >Emitted(33, 24) Source(2, 24) + SourceIndex(0) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(34, 5) Source(2, 25) + SourceIndex(0) -2 >Emitted(34, 16) Source(2, 39) + SourceIndex(0) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(35, 10) Source(2, 25) + SourceIndex(0) -2 >Emitted(35, 20) Source(2, 39) + SourceIndex(0) -3 >Emitted(35, 22) Source(2, 25) + SourceIndex(0) -4 >Emitted(35, 43) Source(2, 39) + SourceIndex(0) -5 >Emitted(35, 45) Source(2, 25) + SourceIndex(0) -6 >Emitted(35, 49) Source(2, 39) + SourceIndex(0) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(36, 9) Source(2, 25) + SourceIndex(0) -2 >Emitted(36, 31) Source(2, 39) + SourceIndex(0) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(38, 1) Source(2, 43) + SourceIndex(0) -2 >Emitted(38, 2) Source(2, 44) + SourceIndex(0) +4 >Emitted(33, 29) Source(2, 43) + SourceIndex(0) +5 >Emitted(33, 30) Source(2, 44) + SourceIndex(0) --- >>>libfile0Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -1583,17 +1438,17 @@ sourceFile:file0.ts 9 > 30 10> ] 11> ); -1->Emitted(39, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(39, 15) Source(3, 15) + SourceIndex(0) -3 >Emitted(39, 39) Source(3, 19) + SourceIndex(0) -4 >Emitted(39, 40) Source(3, 20) + SourceIndex(0) -5 >Emitted(39, 42) Source(3, 22) + SourceIndex(0) -6 >Emitted(39, 44) Source(3, 24) + SourceIndex(0) -7 >Emitted(39, 46) Source(3, 26) + SourceIndex(0) -8 >Emitted(39, 48) Source(3, 28) + SourceIndex(0) -9 >Emitted(39, 50) Source(3, 30) + SourceIndex(0) -10>Emitted(39, 51) Source(3, 31) + SourceIndex(0) -11>Emitted(39, 54) Source(3, 33) + SourceIndex(0) +1->Emitted(34, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(34, 15) Source(3, 15) + SourceIndex(0) +3 >Emitted(34, 39) Source(3, 19) + SourceIndex(0) +4 >Emitted(34, 40) Source(3, 20) + SourceIndex(0) +5 >Emitted(34, 42) Source(3, 22) + SourceIndex(0) +6 >Emitted(34, 44) Source(3, 24) + SourceIndex(0) +7 >Emitted(34, 46) Source(3, 26) + SourceIndex(0) +8 >Emitted(34, 48) Source(3, 28) + SourceIndex(0) +9 >Emitted(34, 50) Source(3, 30) + SourceIndex(0) +10>Emitted(34, 51) Source(3, 31) + SourceIndex(0) +11>Emitted(34, 54) Source(3, 33) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.js @@ -1617,12 +1472,12 @@ sourceFile:file1.ts 4 > = 5 > 10 6 > ; -1->Emitted(44, 5) Source(1, 14) + SourceIndex(1) -2 >Emitted(44, 13) Source(1, 14) + SourceIndex(1) -3 >Emitted(44, 14) Source(1, 15) + SourceIndex(1) -4 >Emitted(44, 17) Source(1, 18) + SourceIndex(1) -5 >Emitted(44, 19) Source(1, 20) + SourceIndex(1) -6 >Emitted(44, 20) Source(1, 21) + SourceIndex(1) +1->Emitted(39, 5) Source(1, 14) + SourceIndex(1) +2 >Emitted(39, 13) Source(1, 14) + SourceIndex(1) +3 >Emitted(39, 14) Source(1, 15) + SourceIndex(1) +4 >Emitted(39, 17) Source(1, 18) + SourceIndex(1) +5 >Emitted(39, 19) Source(1, 20) + SourceIndex(1) +6 >Emitted(39, 20) Source(1, 21) + SourceIndex(1) --- >>> function forlibfile1Rest() { 1->^^^^ @@ -1632,9 +1487,9 @@ sourceFile:file1.ts 1-> 2 > function 3 > forlibfile1Rest -1->Emitted(45, 5) Source(1, 21) + SourceIndex(1) -2 >Emitted(45, 14) Source(1, 30) + SourceIndex(1) -3 >Emitted(45, 29) Source(1, 45) + SourceIndex(1) +1->Emitted(40, 5) Source(1, 21) + SourceIndex(1) +2 >Emitted(40, 14) Source(1, 30) + SourceIndex(1) +3 >Emitted(40, 29) Source(1, 45) + SourceIndex(1) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^^^^^ @@ -1688,31 +1543,31 @@ sourceFile:file1.ts 23> { b, ...rest } 24> = { a: 10, b: 30, yy: 30 } 25> ; -1->Emitted(46, 9) Source(2, 1) + SourceIndex(1) -2 >Emitted(46, 13) Source(2, 7) + SourceIndex(1) -3 >Emitted(46, 18) Source(2, 24) + SourceIndex(1) -4 >Emitted(46, 20) Source(2, 26) + SourceIndex(1) -5 >Emitted(46, 21) Source(2, 27) + SourceIndex(1) -6 >Emitted(46, 23) Source(2, 29) + SourceIndex(1) -7 >Emitted(46, 25) Source(2, 31) + SourceIndex(1) -8 >Emitted(46, 27) Source(2, 33) + SourceIndex(1) -9 >Emitted(46, 28) Source(2, 34) + SourceIndex(1) -10>Emitted(46, 30) Source(2, 36) + SourceIndex(1) -11>Emitted(46, 32) Source(2, 38) + SourceIndex(1) -12>Emitted(46, 34) Source(2, 40) + SourceIndex(1) -13>Emitted(46, 36) Source(2, 42) + SourceIndex(1) -14>Emitted(46, 38) Source(2, 44) + SourceIndex(1) -15>Emitted(46, 40) Source(2, 46) + SourceIndex(1) -16>Emitted(46, 42) Source(2, 48) + SourceIndex(1) -17>Emitted(46, 44) Source(2, 9) + SourceIndex(1) -18>Emitted(46, 45) Source(2, 10) + SourceIndex(1) -19>Emitted(46, 52) Source(2, 10) + SourceIndex(1) -20>Emitted(46, 54) Source(2, 15) + SourceIndex(1) -21>Emitted(46, 58) Source(2, 19) + SourceIndex(1) -22>Emitted(46, 72) Source(2, 7) + SourceIndex(1) -23>Emitted(46, 77) Source(2, 21) + SourceIndex(1) -24>Emitted(46, 78) Source(2, 48) + SourceIndex(1) -25>Emitted(46, 79) Source(2, 49) + SourceIndex(1) +1->Emitted(41, 9) Source(2, 1) + SourceIndex(1) +2 >Emitted(41, 13) Source(2, 7) + SourceIndex(1) +3 >Emitted(41, 18) Source(2, 24) + SourceIndex(1) +4 >Emitted(41, 20) Source(2, 26) + SourceIndex(1) +5 >Emitted(41, 21) Source(2, 27) + SourceIndex(1) +6 >Emitted(41, 23) Source(2, 29) + SourceIndex(1) +7 >Emitted(41, 25) Source(2, 31) + SourceIndex(1) +8 >Emitted(41, 27) Source(2, 33) + SourceIndex(1) +9 >Emitted(41, 28) Source(2, 34) + SourceIndex(1) +10>Emitted(41, 30) Source(2, 36) + SourceIndex(1) +11>Emitted(41, 32) Source(2, 38) + SourceIndex(1) +12>Emitted(41, 34) Source(2, 40) + SourceIndex(1) +13>Emitted(41, 36) Source(2, 42) + SourceIndex(1) +14>Emitted(41, 38) Source(2, 44) + SourceIndex(1) +15>Emitted(41, 40) Source(2, 46) + SourceIndex(1) +16>Emitted(41, 42) Source(2, 48) + SourceIndex(1) +17>Emitted(41, 44) Source(2, 9) + SourceIndex(1) +18>Emitted(41, 45) Source(2, 10) + SourceIndex(1) +19>Emitted(41, 52) Source(2, 10) + SourceIndex(1) +20>Emitted(41, 54) Source(2, 15) + SourceIndex(1) +21>Emitted(41, 58) Source(2, 19) + SourceIndex(1) +22>Emitted(41, 72) Source(2, 7) + SourceIndex(1) +23>Emitted(41, 77) Source(2, 21) + SourceIndex(1) +24>Emitted(41, 78) Source(2, 48) + SourceIndex(1) +25>Emitted(41, 79) Source(2, 49) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -1720,8 +1575,8 @@ sourceFile:file1.ts 1 > > 2 > } -1 >Emitted(47, 5) Source(3, 1) + SourceIndex(1) -2 >Emitted(47, 6) Source(3, 2) + SourceIndex(1) +1 >Emitted(42, 5) Source(3, 1) + SourceIndex(1) +2 >Emitted(42, 6) Source(3, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.js @@ -1745,12 +1600,12 @@ sourceFile:file2.ts 4 > = 5 > 20 6 > ; -1 >Emitted(53, 5) Source(1, 14) + SourceIndex(2) -2 >Emitted(53, 13) Source(1, 14) + SourceIndex(2) -3 >Emitted(53, 14) Source(1, 15) + SourceIndex(2) -4 >Emitted(53, 17) Source(1, 18) + SourceIndex(2) -5 >Emitted(53, 19) Source(1, 20) + SourceIndex(2) -6 >Emitted(53, 20) Source(1, 21) + SourceIndex(2) +1 >Emitted(48, 5) Source(1, 14) + SourceIndex(2) +2 >Emitted(48, 13) Source(1, 14) + SourceIndex(2) +3 >Emitted(48, 14) Source(1, 15) + SourceIndex(2) +4 >Emitted(48, 17) Source(1, 18) + SourceIndex(2) +5 >Emitted(48, 19) Source(1, 20) + SourceIndex(2) +6 >Emitted(48, 20) Source(1, 21) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.js @@ -1771,12 +1626,12 @@ sourceFile:global.ts 4 > = 5 > 10 6 > ; -1 >Emitted(55, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(55, 5) Source(1, 7) + SourceIndex(3) -3 >Emitted(55, 16) Source(1, 18) + SourceIndex(3) -4 >Emitted(55, 19) Source(1, 21) + SourceIndex(3) -5 >Emitted(55, 21) Source(1, 23) + SourceIndex(3) -6 >Emitted(55, 22) Source(1, 24) + SourceIndex(3) +1 >Emitted(50, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(50, 5) Source(1, 7) + SourceIndex(3) +3 >Emitted(50, 16) Source(1, 18) + SourceIndex(3) +4 >Emitted(50, 19) Source(1, 21) + SourceIndex(3) +5 >Emitted(50, 21) Source(1, 23) + SourceIndex(3) +6 >Emitted(50, 22) Source(1, 24) + SourceIndex(3) --- >>>//# sourceMappingURL=module.js.map @@ -1812,7 +1667,7 @@ sourceFile:global.ts }, { "pos": 1180, - "end": 1956, + "end": 1846, "kind": "text" } ], @@ -1878,14 +1733,9 @@ var __rest = (this && this.__rest) || function (s, e) { return t; }; ---------------------------------------------------------------------- -text: (1180-1956) +text: (1180-1846) var myGlob = 20; -function libfile0Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function libfile0Spread() { } libfile0Spread.apply(void 0, __spread([10, 20, 30])); define("file1", ["require", "exports"], function (require, exports) { "use strict"; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js index 8656390abe226..65d3e3636d309 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js @@ -84,17 +84,12 @@ console.log(f()); function f() { return "JS does hoists"; } -function firstfirst_part3Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function firstfirst_part3Spread() { } firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); //# sourceMappingURL=first-output.js.map //// [/src/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACbhB,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACbhB,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AACD,SAAS,sBAAsB,KAAmB,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} //// [/src/first/bin/first-output.js.map.baseline.txt] =================================================================== @@ -390,71 +385,31 @@ sourceFile:../first_part3.ts >>>} 1 > 2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > 2 >} 1 >Emitted(41, 1) Source(3, 1) + SourceIndex(2) 2 >Emitted(41, 2) Source(3, 2) + SourceIndex(2) --- ->>>function firstfirst_part3Spread() { +>>>function firstfirst_part3Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >function 3 > firstfirst_part3Spread +4 > (...b: number[]) { +5 > } 1->Emitted(42, 1) Source(4, 1) + SourceIndex(2) 2 >Emitted(42, 10) Source(4, 10) + SourceIndex(2) 3 >Emitted(42, 32) Source(4, 32) + SourceIndex(2) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(43, 5) Source(4, 33) + SourceIndex(2) -2 >Emitted(43, 16) Source(4, 47) + SourceIndex(2) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(44, 10) Source(4, 33) + SourceIndex(2) -2 >Emitted(44, 20) Source(4, 47) + SourceIndex(2) -3 >Emitted(44, 22) Source(4, 33) + SourceIndex(2) -4 >Emitted(44, 43) Source(4, 47) + SourceIndex(2) -5 >Emitted(44, 45) Source(4, 33) + SourceIndex(2) -6 >Emitted(44, 49) Source(4, 47) + SourceIndex(2) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(45, 9) Source(4, 33) + SourceIndex(2) -2 >Emitted(45, 31) Source(4, 47) + SourceIndex(2) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(47, 1) Source(4, 51) + SourceIndex(2) -2 >Emitted(47, 2) Source(4, 52) + SourceIndex(2) +4 >Emitted(42, 37) Source(4, 51) + SourceIndex(2) +5 >Emitted(42, 38) Source(4, 52) + SourceIndex(2) --- >>>firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -480,17 +435,17 @@ sourceFile:../first_part3.ts 9 > 30 10> ] 11> ); -1->Emitted(48, 1) Source(5, 1) + SourceIndex(2) -2 >Emitted(48, 23) Source(5, 23) + SourceIndex(2) -3 >Emitted(48, 47) Source(5, 27) + SourceIndex(2) -4 >Emitted(48, 48) Source(5, 28) + SourceIndex(2) -5 >Emitted(48, 50) Source(5, 30) + SourceIndex(2) -6 >Emitted(48, 52) Source(5, 32) + SourceIndex(2) -7 >Emitted(48, 54) Source(5, 34) + SourceIndex(2) -8 >Emitted(48, 56) Source(5, 36) + SourceIndex(2) -9 >Emitted(48, 58) Source(5, 38) + SourceIndex(2) -10>Emitted(48, 59) Source(5, 39) + SourceIndex(2) -11>Emitted(48, 62) Source(5, 41) + SourceIndex(2) +1->Emitted(43, 1) Source(5, 1) + SourceIndex(2) +2 >Emitted(43, 23) Source(5, 23) + SourceIndex(2) +3 >Emitted(43, 47) Source(5, 27) + SourceIndex(2) +4 >Emitted(43, 48) Source(5, 28) + SourceIndex(2) +5 >Emitted(43, 50) Source(5, 30) + SourceIndex(2) +6 >Emitted(43, 52) Source(5, 32) + SourceIndex(2) +7 >Emitted(43, 54) Source(5, 34) + SourceIndex(2) +8 >Emitted(43, 56) Source(5, 36) + SourceIndex(2) +9 >Emitted(43, 58) Source(5, 38) + SourceIndex(2) +10>Emitted(43, 59) Source(5, 39) + SourceIndex(2) +11>Emitted(43, 62) Source(5, 41) + SourceIndex(2) --- >>>//# sourceMappingURL=first-output.js.map @@ -525,7 +480,7 @@ sourceFile:../first_part3.ts }, { "pos": 1180, - "end": 1636, + "end": 1526, "kind": "text" } ], @@ -591,7 +546,7 @@ var __spread = (this && this.__spread) || function () { return ar; }; ---------------------------------------------------------------------- -text: (1180-1636) +text: (1180-1526) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -602,12 +557,7 @@ console.log(f()); function f() { return "JS does hoists"; } -function firstfirst_part3Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function firstfirst_part3Spread() { } firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); ====================================================================== @@ -670,12 +620,7 @@ console.log(f()); function f() { return "JS does hoists"; } -function firstfirst_part3Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function firstfirst_part3Spread() { } firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); var N; (function (N) { @@ -695,29 +640,19 @@ var C = (function () { }; return C; }()); -function secondsecond_part2Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function secondsecond_part2Spread() { } secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); } -function thirdthird_part1Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function thirdthird_part1Spread() { } thirdthird_part1Spread.apply(void 0, __spread([10, 20, 30])); //# sourceMappingURL=third-output.js.map //// [/src/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACbhB,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACAxC,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;AAED,SAAS,wBAAwB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACP1C,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACbhB,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AACD,SAAS,sBAAsB,KAAmB,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACAxC,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;AAED,SAAS,wBAAwB,KAAmB,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACP1C,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;AACD,SAAS,sBAAsB,KAAmB,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} //// [/src/third/thirdjs/output/third-output.js.map.baseline.txt] =================================================================== @@ -1013,71 +948,31 @@ sourceFile:../../../first/first_part3.ts >>>} 1 > 2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > 2 >} 1 >Emitted(41, 1) Source(3, 1) + SourceIndex(2) 2 >Emitted(41, 2) Source(3, 2) + SourceIndex(2) --- ->>>function firstfirst_part3Spread() { +>>>function firstfirst_part3Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >function 3 > firstfirst_part3Spread +4 > (...b: number[]) { +5 > } 1->Emitted(42, 1) Source(4, 1) + SourceIndex(2) 2 >Emitted(42, 10) Source(4, 10) + SourceIndex(2) 3 >Emitted(42, 32) Source(4, 32) + SourceIndex(2) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(43, 5) Source(4, 33) + SourceIndex(2) -2 >Emitted(43, 16) Source(4, 47) + SourceIndex(2) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(44, 10) Source(4, 33) + SourceIndex(2) -2 >Emitted(44, 20) Source(4, 47) + SourceIndex(2) -3 >Emitted(44, 22) Source(4, 33) + SourceIndex(2) -4 >Emitted(44, 43) Source(4, 47) + SourceIndex(2) -5 >Emitted(44, 45) Source(4, 33) + SourceIndex(2) -6 >Emitted(44, 49) Source(4, 47) + SourceIndex(2) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(45, 9) Source(4, 33) + SourceIndex(2) -2 >Emitted(45, 31) Source(4, 47) + SourceIndex(2) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(47, 1) Source(4, 51) + SourceIndex(2) -2 >Emitted(47, 2) Source(4, 52) + SourceIndex(2) +4 >Emitted(42, 37) Source(4, 51) + SourceIndex(2) +5 >Emitted(42, 38) Source(4, 52) + SourceIndex(2) --- >>>firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -1103,17 +998,17 @@ sourceFile:../../../first/first_part3.ts 9 > 30 10> ] 11> ); -1->Emitted(48, 1) Source(5, 1) + SourceIndex(2) -2 >Emitted(48, 23) Source(5, 23) + SourceIndex(2) -3 >Emitted(48, 47) Source(5, 27) + SourceIndex(2) -4 >Emitted(48, 48) Source(5, 28) + SourceIndex(2) -5 >Emitted(48, 50) Source(5, 30) + SourceIndex(2) -6 >Emitted(48, 52) Source(5, 32) + SourceIndex(2) -7 >Emitted(48, 54) Source(5, 34) + SourceIndex(2) -8 >Emitted(48, 56) Source(5, 36) + SourceIndex(2) -9 >Emitted(48, 58) Source(5, 38) + SourceIndex(2) -10>Emitted(48, 59) Source(5, 39) + SourceIndex(2) -11>Emitted(48, 62) Source(5, 41) + SourceIndex(2) +1->Emitted(43, 1) Source(5, 1) + SourceIndex(2) +2 >Emitted(43, 23) Source(5, 23) + SourceIndex(2) +3 >Emitted(43, 47) Source(5, 27) + SourceIndex(2) +4 >Emitted(43, 48) Source(5, 28) + SourceIndex(2) +5 >Emitted(43, 50) Source(5, 30) + SourceIndex(2) +6 >Emitted(43, 52) Source(5, 32) + SourceIndex(2) +7 >Emitted(43, 54) Source(5, 34) + SourceIndex(2) +8 >Emitted(43, 56) Source(5, 36) + SourceIndex(2) +9 >Emitted(43, 58) Source(5, 38) + SourceIndex(2) +10>Emitted(43, 59) Source(5, 39) + SourceIndex(2) +11>Emitted(43, 62) Source(5, 41) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1139,10 +1034,10 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1 >Emitted(49, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(49, 5) Source(5, 11) + SourceIndex(3) -3 >Emitted(49, 6) Source(5, 12) + SourceIndex(3) -4 >Emitted(49, 7) Source(11, 2) + SourceIndex(3) +1 >Emitted(44, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(44, 5) Source(5, 11) + SourceIndex(3) +3 >Emitted(44, 6) Source(5, 12) + SourceIndex(3) +4 >Emitted(44, 7) Source(11, 2) + SourceIndex(3) --- >>>(function (N) { 1-> @@ -1152,9 +1047,9 @@ sourceFile:../../../second/second_part1.ts 1-> 2 >namespace 3 > N -1->Emitted(50, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(50, 12) Source(5, 11) + SourceIndex(3) -3 >Emitted(50, 13) Source(5, 12) + SourceIndex(3) +1->Emitted(45, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(45, 12) Source(5, 11) + SourceIndex(3) +3 >Emitted(45, 13) Source(5, 12) + SourceIndex(3) --- >>> function f() { 1->^^^^ @@ -1165,9 +1060,9 @@ sourceFile:../../../second/second_part1.ts > 2 > function 3 > f -1->Emitted(51, 5) Source(6, 5) + SourceIndex(3) -2 >Emitted(51, 14) Source(6, 14) + SourceIndex(3) -3 >Emitted(51, 15) Source(6, 15) + SourceIndex(3) +1->Emitted(46, 5) Source(6, 5) + SourceIndex(3) +2 >Emitted(46, 14) Source(6, 14) + SourceIndex(3) +3 >Emitted(46, 15) Source(6, 15) + SourceIndex(3) --- >>> console.log('testing'); 1->^^^^^^^^ @@ -1187,14 +1082,14 @@ sourceFile:../../../second/second_part1.ts 6 > 'testing' 7 > ) 8 > ; -1->Emitted(52, 9) Source(7, 9) + SourceIndex(3) -2 >Emitted(52, 16) Source(7, 16) + SourceIndex(3) -3 >Emitted(52, 17) Source(7, 17) + SourceIndex(3) -4 >Emitted(52, 20) Source(7, 20) + SourceIndex(3) -5 >Emitted(52, 21) Source(7, 21) + SourceIndex(3) -6 >Emitted(52, 30) Source(7, 30) + SourceIndex(3) -7 >Emitted(52, 31) Source(7, 31) + SourceIndex(3) -8 >Emitted(52, 32) Source(7, 32) + SourceIndex(3) +1->Emitted(47, 9) Source(7, 9) + SourceIndex(3) +2 >Emitted(47, 16) Source(7, 16) + SourceIndex(3) +3 >Emitted(47, 17) Source(7, 17) + SourceIndex(3) +4 >Emitted(47, 20) Source(7, 20) + SourceIndex(3) +5 >Emitted(47, 21) Source(7, 21) + SourceIndex(3) +6 >Emitted(47, 30) Source(7, 30) + SourceIndex(3) +7 >Emitted(47, 31) Source(7, 31) + SourceIndex(3) +8 >Emitted(47, 32) Source(7, 32) + SourceIndex(3) --- >>> } 1 >^^^^ @@ -1203,8 +1098,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 > } -1 >Emitted(53, 5) Source(8, 5) + SourceIndex(3) -2 >Emitted(53, 6) Source(8, 6) + SourceIndex(3) +1 >Emitted(48, 5) Source(8, 5) + SourceIndex(3) +2 >Emitted(48, 6) Source(8, 6) + SourceIndex(3) --- >>> f(); 1->^^^^ @@ -1218,10 +1113,10 @@ sourceFile:../../../second/second_part1.ts 2 > f 3 > () 4 > ; -1->Emitted(54, 5) Source(10, 5) + SourceIndex(3) -2 >Emitted(54, 6) Source(10, 6) + SourceIndex(3) -3 >Emitted(54, 8) Source(10, 8) + SourceIndex(3) -4 >Emitted(54, 9) Source(10, 9) + SourceIndex(3) +1->Emitted(49, 5) Source(10, 5) + SourceIndex(3) +2 >Emitted(49, 6) Source(10, 6) + SourceIndex(3) +3 >Emitted(49, 8) Source(10, 8) + SourceIndex(3) +4 >Emitted(49, 9) Source(10, 9) + SourceIndex(3) --- >>>})(N || (N = {})); 1-> @@ -1246,13 +1141,13 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(55, 1) Source(11, 1) + SourceIndex(3) -2 >Emitted(55, 2) Source(11, 2) + SourceIndex(3) -3 >Emitted(55, 4) Source(5, 11) + SourceIndex(3) -4 >Emitted(55, 5) Source(5, 12) + SourceIndex(3) -5 >Emitted(55, 10) Source(5, 11) + SourceIndex(3) -6 >Emitted(55, 11) Source(5, 12) + SourceIndex(3) -7 >Emitted(55, 19) Source(11, 2) + SourceIndex(3) +1->Emitted(50, 1) Source(11, 1) + SourceIndex(3) +2 >Emitted(50, 2) Source(11, 2) + SourceIndex(3) +3 >Emitted(50, 4) Source(5, 11) + SourceIndex(3) +4 >Emitted(50, 5) Source(5, 12) + SourceIndex(3) +5 >Emitted(50, 10) Source(5, 11) + SourceIndex(3) +6 >Emitted(50, 11) Source(5, 12) + SourceIndex(3) +7 >Emitted(50, 19) Source(11, 2) + SourceIndex(3) --- >>>function forsecondsecond_part1Rest() { 1-> @@ -1263,9 +1158,9 @@ sourceFile:../../../second/second_part1.ts > 2 >function 3 > forsecondsecond_part1Rest -1->Emitted(56, 1) Source(12, 1) + SourceIndex(3) -2 >Emitted(56, 10) Source(12, 10) + SourceIndex(3) -3 >Emitted(56, 35) Source(12, 35) + SourceIndex(3) +1->Emitted(51, 1) Source(12, 1) + SourceIndex(3) +2 >Emitted(51, 10) Source(12, 10) + SourceIndex(3) +3 >Emitted(51, 35) Source(12, 35) + SourceIndex(3) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -1319,31 +1214,31 @@ sourceFile:../../../second/second_part1.ts 23> { b, ...rest } 24> = { a: 10, b: 30, yy: 30 } 25> ; -1->Emitted(57, 5) Source(13, 1) + SourceIndex(3) -2 >Emitted(57, 9) Source(13, 7) + SourceIndex(3) -3 >Emitted(57, 14) Source(13, 24) + SourceIndex(3) -4 >Emitted(57, 16) Source(13, 26) + SourceIndex(3) -5 >Emitted(57, 17) Source(13, 27) + SourceIndex(3) -6 >Emitted(57, 19) Source(13, 29) + SourceIndex(3) -7 >Emitted(57, 21) Source(13, 31) + SourceIndex(3) -8 >Emitted(57, 23) Source(13, 33) + SourceIndex(3) -9 >Emitted(57, 24) Source(13, 34) + SourceIndex(3) -10>Emitted(57, 26) Source(13, 36) + SourceIndex(3) -11>Emitted(57, 28) Source(13, 38) + SourceIndex(3) -12>Emitted(57, 30) Source(13, 40) + SourceIndex(3) -13>Emitted(57, 32) Source(13, 42) + SourceIndex(3) -14>Emitted(57, 34) Source(13, 44) + SourceIndex(3) -15>Emitted(57, 36) Source(13, 46) + SourceIndex(3) -16>Emitted(57, 38) Source(13, 48) + SourceIndex(3) -17>Emitted(57, 40) Source(13, 9) + SourceIndex(3) -18>Emitted(57, 41) Source(13, 10) + SourceIndex(3) -19>Emitted(57, 48) Source(13, 10) + SourceIndex(3) -20>Emitted(57, 50) Source(13, 15) + SourceIndex(3) -21>Emitted(57, 54) Source(13, 19) + SourceIndex(3) -22>Emitted(57, 68) Source(13, 7) + SourceIndex(3) -23>Emitted(57, 73) Source(13, 21) + SourceIndex(3) -24>Emitted(57, 74) Source(13, 48) + SourceIndex(3) -25>Emitted(57, 75) Source(13, 49) + SourceIndex(3) +1->Emitted(52, 5) Source(13, 1) + SourceIndex(3) +2 >Emitted(52, 9) Source(13, 7) + SourceIndex(3) +3 >Emitted(52, 14) Source(13, 24) + SourceIndex(3) +4 >Emitted(52, 16) Source(13, 26) + SourceIndex(3) +5 >Emitted(52, 17) Source(13, 27) + SourceIndex(3) +6 >Emitted(52, 19) Source(13, 29) + SourceIndex(3) +7 >Emitted(52, 21) Source(13, 31) + SourceIndex(3) +8 >Emitted(52, 23) Source(13, 33) + SourceIndex(3) +9 >Emitted(52, 24) Source(13, 34) + SourceIndex(3) +10>Emitted(52, 26) Source(13, 36) + SourceIndex(3) +11>Emitted(52, 28) Source(13, 38) + SourceIndex(3) +12>Emitted(52, 30) Source(13, 40) + SourceIndex(3) +13>Emitted(52, 32) Source(13, 42) + SourceIndex(3) +14>Emitted(52, 34) Source(13, 44) + SourceIndex(3) +15>Emitted(52, 36) Source(13, 46) + SourceIndex(3) +16>Emitted(52, 38) Source(13, 48) + SourceIndex(3) +17>Emitted(52, 40) Source(13, 9) + SourceIndex(3) +18>Emitted(52, 41) Source(13, 10) + SourceIndex(3) +19>Emitted(52, 48) Source(13, 10) + SourceIndex(3) +20>Emitted(52, 50) Source(13, 15) + SourceIndex(3) +21>Emitted(52, 54) Source(13, 19) + SourceIndex(3) +22>Emitted(52, 68) Source(13, 7) + SourceIndex(3) +23>Emitted(52, 73) Source(13, 21) + SourceIndex(3) +24>Emitted(52, 74) Source(13, 48) + SourceIndex(3) +25>Emitted(52, 75) Source(13, 49) + SourceIndex(3) --- >>>} 1 > @@ -1352,8 +1247,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 >} -1 >Emitted(58, 1) Source(14, 1) + SourceIndex(3) -2 >Emitted(58, 2) Source(14, 2) + SourceIndex(3) +1 >Emitted(53, 1) Source(14, 1) + SourceIndex(3) +2 >Emitted(53, 2) Source(14, 2) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1363,13 +1258,13 @@ sourceFile:../../../second/second_part2.ts 1-> 2 >^^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(59, 1) Source(1, 1) + SourceIndex(4) +1->Emitted(54, 1) Source(1, 1) + SourceIndex(4) --- >>> function C() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(60, 5) Source(1, 1) + SourceIndex(4) +1->Emitted(55, 5) Source(1, 1) + SourceIndex(4) --- >>> } 1->^^^^ @@ -1381,8 +1276,8 @@ sourceFile:../../../second/second_part2.ts > } > 2 > } -1->Emitted(61, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(61, 6) Source(5, 2) + SourceIndex(4) +1->Emitted(56, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(56, 6) Source(5, 2) + SourceIndex(4) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -1392,9 +1287,9 @@ sourceFile:../../../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(62, 5) Source(2, 5) + SourceIndex(4) -2 >Emitted(62, 28) Source(2, 16) + SourceIndex(4) -3 >Emitted(62, 31) Source(2, 5) + SourceIndex(4) +1->Emitted(57, 5) Source(2, 5) + SourceIndex(4) +2 >Emitted(57, 28) Source(2, 16) + SourceIndex(4) +3 >Emitted(57, 31) Source(2, 5) + SourceIndex(4) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -1414,14 +1309,14 @@ sourceFile:../../../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(63, 9) Source(3, 9) + SourceIndex(4) -2 >Emitted(63, 16) Source(3, 16) + SourceIndex(4) -3 >Emitted(63, 17) Source(3, 17) + SourceIndex(4) -4 >Emitted(63, 20) Source(3, 20) + SourceIndex(4) -5 >Emitted(63, 21) Source(3, 21) + SourceIndex(4) -6 >Emitted(63, 41) Source(3, 41) + SourceIndex(4) -7 >Emitted(63, 42) Source(3, 42) + SourceIndex(4) -8 >Emitted(63, 43) Source(3, 43) + SourceIndex(4) +1->Emitted(58, 9) Source(3, 9) + SourceIndex(4) +2 >Emitted(58, 16) Source(3, 16) + SourceIndex(4) +3 >Emitted(58, 17) Source(3, 17) + SourceIndex(4) +4 >Emitted(58, 20) Source(3, 20) + SourceIndex(4) +5 >Emitted(58, 21) Source(3, 21) + SourceIndex(4) +6 >Emitted(58, 41) Source(3, 41) + SourceIndex(4) +7 >Emitted(58, 42) Source(3, 42) + SourceIndex(4) +8 >Emitted(58, 43) Source(3, 43) + SourceIndex(4) --- >>> }; 1 >^^^^ @@ -1430,8 +1325,8 @@ sourceFile:../../../second/second_part2.ts 1 > > 2 > } -1 >Emitted(64, 5) Source(4, 5) + SourceIndex(4) -2 >Emitted(64, 6) Source(4, 6) + SourceIndex(4) +1 >Emitted(59, 5) Source(4, 5) + SourceIndex(4) +2 >Emitted(59, 6) Source(4, 6) + SourceIndex(4) --- >>> return C; 1->^^^^ @@ -1439,15 +1334,15 @@ sourceFile:../../../second/second_part2.ts 1-> > 2 > } -1->Emitted(65, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(65, 13) Source(5, 2) + SourceIndex(4) +1->Emitted(60, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(60, 13) Source(5, 2) + SourceIndex(4) --- >>>}()); 1 > 2 >^ 3 > 4 > ^^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 2 >} 3 > @@ -1456,70 +1351,30 @@ sourceFile:../../../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(66, 1) Source(5, 1) + SourceIndex(4) -2 >Emitted(66, 2) Source(5, 2) + SourceIndex(4) -3 >Emitted(66, 2) Source(1, 1) + SourceIndex(4) -4 >Emitted(66, 6) Source(5, 2) + SourceIndex(4) +1 >Emitted(61, 1) Source(5, 1) + SourceIndex(4) +2 >Emitted(61, 2) Source(5, 2) + SourceIndex(4) +3 >Emitted(61, 2) Source(1, 1) + SourceIndex(4) +4 >Emitted(61, 6) Source(5, 2) + SourceIndex(4) --- ->>>function secondsecond_part2Spread() { +>>>function secondsecond_part2Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > 2 >function 3 > secondsecond_part2Spread -1->Emitted(67, 1) Source(7, 1) + SourceIndex(4) -2 >Emitted(67, 10) Source(7, 10) + SourceIndex(4) -3 >Emitted(67, 34) Source(7, 34) + SourceIndex(4) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(68, 5) Source(7, 35) + SourceIndex(4) -2 >Emitted(68, 16) Source(7, 49) + SourceIndex(4) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(69, 10) Source(7, 35) + SourceIndex(4) -2 >Emitted(69, 20) Source(7, 49) + SourceIndex(4) -3 >Emitted(69, 22) Source(7, 35) + SourceIndex(4) -4 >Emitted(69, 43) Source(7, 49) + SourceIndex(4) -5 >Emitted(69, 45) Source(7, 35) + SourceIndex(4) -6 >Emitted(69, 49) Source(7, 49) + SourceIndex(4) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(70, 9) Source(7, 35) + SourceIndex(4) -2 >Emitted(70, 31) Source(7, 49) + SourceIndex(4) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(72, 1) Source(7, 53) + SourceIndex(4) -2 >Emitted(72, 2) Source(7, 54) + SourceIndex(4) +4 > (...b: number[]) { +5 > } +1->Emitted(62, 1) Source(7, 1) + SourceIndex(4) +2 >Emitted(62, 10) Source(7, 10) + SourceIndex(4) +3 >Emitted(62, 34) Source(7, 34) + SourceIndex(4) +4 >Emitted(62, 39) Source(7, 53) + SourceIndex(4) +5 >Emitted(62, 40) Source(7, 54) + SourceIndex(4) --- >>>secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -1545,17 +1400,17 @@ sourceFile:../../../second/second_part2.ts 9 > 30 10> ] 11> ); -1->Emitted(73, 1) Source(8, 1) + SourceIndex(4) -2 >Emitted(73, 25) Source(8, 25) + SourceIndex(4) -3 >Emitted(73, 49) Source(8, 29) + SourceIndex(4) -4 >Emitted(73, 50) Source(8, 30) + SourceIndex(4) -5 >Emitted(73, 52) Source(8, 32) + SourceIndex(4) -6 >Emitted(73, 54) Source(8, 34) + SourceIndex(4) -7 >Emitted(73, 56) Source(8, 36) + SourceIndex(4) -8 >Emitted(73, 58) Source(8, 38) + SourceIndex(4) -9 >Emitted(73, 60) Source(8, 40) + SourceIndex(4) -10>Emitted(73, 61) Source(8, 41) + SourceIndex(4) -11>Emitted(73, 64) Source(8, 43) + SourceIndex(4) +1->Emitted(63, 1) Source(8, 1) + SourceIndex(4) +2 >Emitted(63, 25) Source(8, 25) + SourceIndex(4) +3 >Emitted(63, 49) Source(8, 29) + SourceIndex(4) +4 >Emitted(63, 50) Source(8, 30) + SourceIndex(4) +5 >Emitted(63, 52) Source(8, 32) + SourceIndex(4) +6 >Emitted(63, 54) Source(8, 34) + SourceIndex(4) +7 >Emitted(63, 56) Source(8, 36) + SourceIndex(4) +8 >Emitted(63, 58) Source(8, 38) + SourceIndex(4) +9 >Emitted(63, 60) Source(8, 40) + SourceIndex(4) +10>Emitted(63, 61) Source(8, 41) + SourceIndex(4) +11>Emitted(63, 64) Source(8, 43) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1579,14 +1434,14 @@ sourceFile:../../third_part1.ts 6 > C 7 > () 8 > ; -1 >Emitted(74, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(74, 5) Source(1, 5) + SourceIndex(5) -3 >Emitted(74, 6) Source(1, 6) + SourceIndex(5) -4 >Emitted(74, 9) Source(1, 9) + SourceIndex(5) -5 >Emitted(74, 13) Source(1, 13) + SourceIndex(5) -6 >Emitted(74, 14) Source(1, 14) + SourceIndex(5) -7 >Emitted(74, 16) Source(1, 16) + SourceIndex(5) -8 >Emitted(74, 17) Source(1, 17) + SourceIndex(5) +1 >Emitted(64, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(64, 5) Source(1, 5) + SourceIndex(5) +3 >Emitted(64, 6) Source(1, 6) + SourceIndex(5) +4 >Emitted(64, 9) Source(1, 9) + SourceIndex(5) +5 >Emitted(64, 13) Source(1, 13) + SourceIndex(5) +6 >Emitted(64, 14) Source(1, 14) + SourceIndex(5) +7 >Emitted(64, 16) Source(1, 16) + SourceIndex(5) +8 >Emitted(64, 17) Source(1, 17) + SourceIndex(5) --- >>>c.doSomething(); 1-> @@ -1603,12 +1458,12 @@ sourceFile:../../third_part1.ts 4 > doSomething 5 > () 6 > ; -1->Emitted(75, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(75, 2) Source(2, 2) + SourceIndex(5) -3 >Emitted(75, 3) Source(2, 3) + SourceIndex(5) -4 >Emitted(75, 14) Source(2, 14) + SourceIndex(5) -5 >Emitted(75, 16) Source(2, 16) + SourceIndex(5) -6 >Emitted(75, 17) Source(2, 17) + SourceIndex(5) +1->Emitted(65, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(65, 2) Source(2, 2) + SourceIndex(5) +3 >Emitted(65, 3) Source(2, 3) + SourceIndex(5) +4 >Emitted(65, 14) Source(2, 14) + SourceIndex(5) +5 >Emitted(65, 16) Source(2, 16) + SourceIndex(5) +6 >Emitted(65, 17) Source(2, 17) + SourceIndex(5) --- >>>function forthirdthird_part1Rest() { 1-> @@ -1619,9 +1474,9 @@ sourceFile:../../third_part1.ts > 2 >function 3 > forthirdthird_part1Rest -1->Emitted(76, 1) Source(3, 1) + SourceIndex(5) -2 >Emitted(76, 10) Source(3, 10) + SourceIndex(5) -3 >Emitted(76, 33) Source(3, 33) + SourceIndex(5) +1->Emitted(66, 1) Source(3, 1) + SourceIndex(5) +2 >Emitted(66, 10) Source(3, 10) + SourceIndex(5) +3 >Emitted(66, 33) Source(3, 33) + SourceIndex(5) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -1675,100 +1530,60 @@ sourceFile:../../third_part1.ts 23> { b, ...rest } 24> = { a: 10, b: 30, yy: 30 } 25> ; -1->Emitted(77, 5) Source(4, 1) + SourceIndex(5) -2 >Emitted(77, 9) Source(4, 7) + SourceIndex(5) -3 >Emitted(77, 14) Source(4, 24) + SourceIndex(5) -4 >Emitted(77, 16) Source(4, 26) + SourceIndex(5) -5 >Emitted(77, 17) Source(4, 27) + SourceIndex(5) -6 >Emitted(77, 19) Source(4, 29) + SourceIndex(5) -7 >Emitted(77, 21) Source(4, 31) + SourceIndex(5) -8 >Emitted(77, 23) Source(4, 33) + SourceIndex(5) -9 >Emitted(77, 24) Source(4, 34) + SourceIndex(5) -10>Emitted(77, 26) Source(4, 36) + SourceIndex(5) -11>Emitted(77, 28) Source(4, 38) + SourceIndex(5) -12>Emitted(77, 30) Source(4, 40) + SourceIndex(5) -13>Emitted(77, 32) Source(4, 42) + SourceIndex(5) -14>Emitted(77, 34) Source(4, 44) + SourceIndex(5) -15>Emitted(77, 36) Source(4, 46) + SourceIndex(5) -16>Emitted(77, 38) Source(4, 48) + SourceIndex(5) -17>Emitted(77, 40) Source(4, 9) + SourceIndex(5) -18>Emitted(77, 41) Source(4, 10) + SourceIndex(5) -19>Emitted(77, 48) Source(4, 10) + SourceIndex(5) -20>Emitted(77, 50) Source(4, 15) + SourceIndex(5) -21>Emitted(77, 54) Source(4, 19) + SourceIndex(5) -22>Emitted(77, 68) Source(4, 7) + SourceIndex(5) -23>Emitted(77, 73) Source(4, 21) + SourceIndex(5) -24>Emitted(77, 74) Source(4, 48) + SourceIndex(5) -25>Emitted(77, 75) Source(4, 49) + SourceIndex(5) +1->Emitted(67, 5) Source(4, 1) + SourceIndex(5) +2 >Emitted(67, 9) Source(4, 7) + SourceIndex(5) +3 >Emitted(67, 14) Source(4, 24) + SourceIndex(5) +4 >Emitted(67, 16) Source(4, 26) + SourceIndex(5) +5 >Emitted(67, 17) Source(4, 27) + SourceIndex(5) +6 >Emitted(67, 19) Source(4, 29) + SourceIndex(5) +7 >Emitted(67, 21) Source(4, 31) + SourceIndex(5) +8 >Emitted(67, 23) Source(4, 33) + SourceIndex(5) +9 >Emitted(67, 24) Source(4, 34) + SourceIndex(5) +10>Emitted(67, 26) Source(4, 36) + SourceIndex(5) +11>Emitted(67, 28) Source(4, 38) + SourceIndex(5) +12>Emitted(67, 30) Source(4, 40) + SourceIndex(5) +13>Emitted(67, 32) Source(4, 42) + SourceIndex(5) +14>Emitted(67, 34) Source(4, 44) + SourceIndex(5) +15>Emitted(67, 36) Source(4, 46) + SourceIndex(5) +16>Emitted(67, 38) Source(4, 48) + SourceIndex(5) +17>Emitted(67, 40) Source(4, 9) + SourceIndex(5) +18>Emitted(67, 41) Source(4, 10) + SourceIndex(5) +19>Emitted(67, 48) Source(4, 10) + SourceIndex(5) +20>Emitted(67, 50) Source(4, 15) + SourceIndex(5) +21>Emitted(67, 54) Source(4, 19) + SourceIndex(5) +22>Emitted(67, 68) Source(4, 7) + SourceIndex(5) +23>Emitted(67, 73) Source(4, 21) + SourceIndex(5) +24>Emitted(67, 74) Source(4, 48) + SourceIndex(5) +25>Emitted(67, 75) Source(4, 49) + SourceIndex(5) --- >>>} 1 > 2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > 2 >} -1 >Emitted(78, 1) Source(5, 1) + SourceIndex(5) -2 >Emitted(78, 2) Source(5, 2) + SourceIndex(5) +1 >Emitted(68, 1) Source(5, 1) + SourceIndex(5) +2 >Emitted(68, 2) Source(5, 2) + SourceIndex(5) --- ->>>function thirdthird_part1Spread() { +>>>function thirdthird_part1Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >function 3 > thirdthird_part1Spread -1->Emitted(79, 1) Source(6, 1) + SourceIndex(5) -2 >Emitted(79, 10) Source(6, 10) + SourceIndex(5) -3 >Emitted(79, 32) Source(6, 32) + SourceIndex(5) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(80, 5) Source(6, 33) + SourceIndex(5) -2 >Emitted(80, 16) Source(6, 47) + SourceIndex(5) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(81, 10) Source(6, 33) + SourceIndex(5) -2 >Emitted(81, 20) Source(6, 47) + SourceIndex(5) -3 >Emitted(81, 22) Source(6, 33) + SourceIndex(5) -4 >Emitted(81, 43) Source(6, 47) + SourceIndex(5) -5 >Emitted(81, 45) Source(6, 33) + SourceIndex(5) -6 >Emitted(81, 49) Source(6, 47) + SourceIndex(5) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(82, 9) Source(6, 33) + SourceIndex(5) -2 >Emitted(82, 31) Source(6, 47) + SourceIndex(5) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(84, 1) Source(6, 51) + SourceIndex(5) -2 >Emitted(84, 2) Source(6, 52) + SourceIndex(5) +4 > (...b: number[]) { +5 > } +1->Emitted(69, 1) Source(6, 1) + SourceIndex(5) +2 >Emitted(69, 10) Source(6, 10) + SourceIndex(5) +3 >Emitted(69, 32) Source(6, 32) + SourceIndex(5) +4 >Emitted(69, 37) Source(6, 51) + SourceIndex(5) +5 >Emitted(69, 38) Source(6, 52) + SourceIndex(5) --- >>>thirdthird_part1Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -1794,17 +1609,17 @@ sourceFile:../../third_part1.ts 9 > 30 10> ] 11> ); -1->Emitted(85, 1) Source(7, 1) + SourceIndex(5) -2 >Emitted(85, 23) Source(7, 23) + SourceIndex(5) -3 >Emitted(85, 47) Source(7, 27) + SourceIndex(5) -4 >Emitted(85, 48) Source(7, 28) + SourceIndex(5) -5 >Emitted(85, 50) Source(7, 30) + SourceIndex(5) -6 >Emitted(85, 52) Source(7, 32) + SourceIndex(5) -7 >Emitted(85, 54) Source(7, 34) + SourceIndex(5) -8 >Emitted(85, 56) Source(7, 36) + SourceIndex(5) -9 >Emitted(85, 58) Source(7, 38) + SourceIndex(5) -10>Emitted(85, 59) Source(7, 39) + SourceIndex(5) -11>Emitted(85, 62) Source(7, 41) + SourceIndex(5) +1->Emitted(70, 1) Source(7, 1) + SourceIndex(5) +2 >Emitted(70, 23) Source(7, 23) + SourceIndex(5) +3 >Emitted(70, 47) Source(7, 27) + SourceIndex(5) +4 >Emitted(70, 48) Source(7, 28) + SourceIndex(5) +5 >Emitted(70, 50) Source(7, 30) + SourceIndex(5) +6 >Emitted(70, 52) Source(7, 32) + SourceIndex(5) +7 >Emitted(70, 54) Source(7, 34) + SourceIndex(5) +8 >Emitted(70, 56) Source(7, 36) + SourceIndex(5) +9 >Emitted(70, 58) Source(7, 38) + SourceIndex(5) +10>Emitted(70, 59) Source(7, 39) + SourceIndex(5) +11>Emitted(70, 62) Source(7, 41) + SourceIndex(5) --- >>>//# sourceMappingURL=third-output.js.map @@ -1837,33 +1652,33 @@ sourceFile:../../third_part1.ts }, { "pos": 1180, - "end": 1636, + "end": 1526, "kind": "prepend", "data": "../../../first/bin/first-output.js", "texts": [ { "pos": 1180, - "end": 1636, + "end": 1526, "kind": "text" } ] }, { - "pos": 1636, - "end": 2256, + "pos": 1526, + "end": 2036, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { - "pos": 1636, - "end": 2256, + "pos": 1526, + "end": 2036, "kind": "text" } ] }, { - "pos": 2256, - "end": 2621, + "pos": 2036, + "end": 2291, "kind": "text" } ], @@ -1955,9 +1770,9 @@ var __spread = (this && this.__spread) || function () { return ar; }; ---------------------------------------------------------------------- -prepend: (1180-1636):: ../../../first/bin/first-output.js texts:: 1 +prepend: (1180-1526):: ../../../first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1180-1636) +text: (1180-1526) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -1968,18 +1783,13 @@ console.log(f()); function f() { return "JS does hoists"; } -function firstfirst_part3Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function firstfirst_part3Spread() { } firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); ---------------------------------------------------------------------- -prepend: (1636-2256):: ../../../2/second-output.js texts:: 1 +prepend: (1526-2036):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1636-2256) +text: (1526-2036) var N; (function (N) { function f() { @@ -1998,27 +1808,17 @@ var C = (function () { }; return C; }()); -function secondsecond_part2Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function secondsecond_part2Spread() { } secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); ---------------------------------------------------------------------- -text: (2256-2621) +text: (2036-2291) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); } -function thirdthird_part1Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function thirdthird_part1Spread() { } thirdthird_part1Spread.apply(void 0, __spread([10, 20, 30])); ====================================================================== diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-different-projects.js index 496c7c571a9cc..1ad7c87764145 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-different-projects.js @@ -489,12 +489,7 @@ var N; } f(); })(N || (N = {})); -function secondsecond_part1Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function secondsecond_part1Spread() { } secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30])); var C = (function () { function C() { @@ -512,7 +507,7 @@ function forthirdthird_part1Rest() { //# sourceMappingURL=third-output.js.map //// [/src/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACbhB,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AAED,SAAS,wBAAwB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACb1C;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACbhB,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AAED,SAAS,wBAAwB,KAAmB,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACb1C;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC"} //// [/src/third/thirdjs/output/third-output.js.map.baseline.txt] =================================================================== @@ -931,7 +926,7 @@ sourceFile:../../../second/second_part1.ts 5 > ^^^^^ 6 > ^ 7 > ^^^^^^^^ -8 > ^^^^^^^^^^^^^^^^^^^^-> +8 > ^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >} @@ -954,65 +949,25 @@ sourceFile:../../../second/second_part1.ts 6 >Emitted(48, 11) Source(5, 12) + SourceIndex(3) 7 >Emitted(48, 19) Source(11, 2) + SourceIndex(3) --- ->>>function secondsecond_part1Spread() { +>>>function secondsecond_part1Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > 2 >function 3 > secondsecond_part1Spread +4 > (...b: number[]) { +5 > } 1->Emitted(49, 1) Source(13, 1) + SourceIndex(3) 2 >Emitted(49, 10) Source(13, 10) + SourceIndex(3) 3 >Emitted(49, 34) Source(13, 34) + SourceIndex(3) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(50, 5) Source(13, 35) + SourceIndex(3) -2 >Emitted(50, 16) Source(13, 49) + SourceIndex(3) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(51, 10) Source(13, 35) + SourceIndex(3) -2 >Emitted(51, 20) Source(13, 49) + SourceIndex(3) -3 >Emitted(51, 22) Source(13, 35) + SourceIndex(3) -4 >Emitted(51, 43) Source(13, 49) + SourceIndex(3) -5 >Emitted(51, 45) Source(13, 35) + SourceIndex(3) -6 >Emitted(51, 49) Source(13, 49) + SourceIndex(3) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(52, 9) Source(13, 35) + SourceIndex(3) -2 >Emitted(52, 31) Source(13, 49) + SourceIndex(3) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(54, 1) Source(13, 53) + SourceIndex(3) -2 >Emitted(54, 2) Source(13, 54) + SourceIndex(3) +4 >Emitted(49, 39) Source(13, 53) + SourceIndex(3) +5 >Emitted(49, 40) Source(13, 54) + SourceIndex(3) --- >>>secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -1038,17 +993,17 @@ sourceFile:../../../second/second_part1.ts 9 > 30 10> ] 11> ); -1->Emitted(55, 1) Source(14, 1) + SourceIndex(3) -2 >Emitted(55, 25) Source(14, 25) + SourceIndex(3) -3 >Emitted(55, 49) Source(14, 29) + SourceIndex(3) -4 >Emitted(55, 50) Source(14, 30) + SourceIndex(3) -5 >Emitted(55, 52) Source(14, 32) + SourceIndex(3) -6 >Emitted(55, 54) Source(14, 34) + SourceIndex(3) -7 >Emitted(55, 56) Source(14, 36) + SourceIndex(3) -8 >Emitted(55, 58) Source(14, 38) + SourceIndex(3) -9 >Emitted(55, 60) Source(14, 40) + SourceIndex(3) -10>Emitted(55, 61) Source(14, 41) + SourceIndex(3) -11>Emitted(55, 64) Source(14, 43) + SourceIndex(3) +1->Emitted(50, 1) Source(14, 1) + SourceIndex(3) +2 >Emitted(50, 25) Source(14, 25) + SourceIndex(3) +3 >Emitted(50, 49) Source(14, 29) + SourceIndex(3) +4 >Emitted(50, 50) Source(14, 30) + SourceIndex(3) +5 >Emitted(50, 52) Source(14, 32) + SourceIndex(3) +6 >Emitted(50, 54) Source(14, 34) + SourceIndex(3) +7 >Emitted(50, 56) Source(14, 36) + SourceIndex(3) +8 >Emitted(50, 58) Source(14, 38) + SourceIndex(3) +9 >Emitted(50, 60) Source(14, 40) + SourceIndex(3) +10>Emitted(50, 61) Source(14, 41) + SourceIndex(3) +11>Emitted(50, 64) Source(14, 43) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1058,13 +1013,13 @@ sourceFile:../../../second/second_part2.ts 1 > 2 >^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(56, 1) Source(1, 1) + SourceIndex(4) +1 >Emitted(51, 1) Source(1, 1) + SourceIndex(4) --- >>> function C() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(57, 5) Source(1, 1) + SourceIndex(4) +1->Emitted(52, 5) Source(1, 1) + SourceIndex(4) --- >>> } 1->^^^^ @@ -1076,8 +1031,8 @@ sourceFile:../../../second/second_part2.ts > } > 2 > } -1->Emitted(58, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(58, 6) Source(5, 2) + SourceIndex(4) +1->Emitted(53, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(53, 6) Source(5, 2) + SourceIndex(4) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -1087,9 +1042,9 @@ sourceFile:../../../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(59, 5) Source(2, 5) + SourceIndex(4) -2 >Emitted(59, 28) Source(2, 16) + SourceIndex(4) -3 >Emitted(59, 31) Source(2, 5) + SourceIndex(4) +1->Emitted(54, 5) Source(2, 5) + SourceIndex(4) +2 >Emitted(54, 28) Source(2, 16) + SourceIndex(4) +3 >Emitted(54, 31) Source(2, 5) + SourceIndex(4) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -1109,14 +1064,14 @@ sourceFile:../../../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(60, 9) Source(3, 9) + SourceIndex(4) -2 >Emitted(60, 16) Source(3, 16) + SourceIndex(4) -3 >Emitted(60, 17) Source(3, 17) + SourceIndex(4) -4 >Emitted(60, 20) Source(3, 20) + SourceIndex(4) -5 >Emitted(60, 21) Source(3, 21) + SourceIndex(4) -6 >Emitted(60, 41) Source(3, 41) + SourceIndex(4) -7 >Emitted(60, 42) Source(3, 42) + SourceIndex(4) -8 >Emitted(60, 43) Source(3, 43) + SourceIndex(4) +1->Emitted(55, 9) Source(3, 9) + SourceIndex(4) +2 >Emitted(55, 16) Source(3, 16) + SourceIndex(4) +3 >Emitted(55, 17) Source(3, 17) + SourceIndex(4) +4 >Emitted(55, 20) Source(3, 20) + SourceIndex(4) +5 >Emitted(55, 21) Source(3, 21) + SourceIndex(4) +6 >Emitted(55, 41) Source(3, 41) + SourceIndex(4) +7 >Emitted(55, 42) Source(3, 42) + SourceIndex(4) +8 >Emitted(55, 43) Source(3, 43) + SourceIndex(4) --- >>> }; 1 >^^^^ @@ -1125,8 +1080,8 @@ sourceFile:../../../second/second_part2.ts 1 > > 2 > } -1 >Emitted(61, 5) Source(4, 5) + SourceIndex(4) -2 >Emitted(61, 6) Source(4, 6) + SourceIndex(4) +1 >Emitted(56, 5) Source(4, 5) + SourceIndex(4) +2 >Emitted(56, 6) Source(4, 6) + SourceIndex(4) --- >>> return C; 1->^^^^ @@ -1134,8 +1089,8 @@ sourceFile:../../../second/second_part2.ts 1-> > 2 > } -1->Emitted(62, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(62, 13) Source(5, 2) + SourceIndex(4) +1->Emitted(57, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(57, 13) Source(5, 2) + SourceIndex(4) --- >>>}()); 1 > @@ -1151,10 +1106,10 @@ sourceFile:../../../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(63, 1) Source(5, 1) + SourceIndex(4) -2 >Emitted(63, 2) Source(5, 2) + SourceIndex(4) -3 >Emitted(63, 2) Source(1, 1) + SourceIndex(4) -4 >Emitted(63, 6) Source(5, 2) + SourceIndex(4) +1 >Emitted(58, 1) Source(5, 1) + SourceIndex(4) +2 >Emitted(58, 2) Source(5, 2) + SourceIndex(4) +3 >Emitted(58, 2) Source(1, 1) + SourceIndex(4) +4 >Emitted(58, 6) Source(5, 2) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1178,14 +1133,14 @@ sourceFile:../../third_part1.ts 6 > C 7 > () 8 > ; -1->Emitted(64, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(64, 5) Source(1, 5) + SourceIndex(5) -3 >Emitted(64, 6) Source(1, 6) + SourceIndex(5) -4 >Emitted(64, 9) Source(1, 9) + SourceIndex(5) -5 >Emitted(64, 13) Source(1, 13) + SourceIndex(5) -6 >Emitted(64, 14) Source(1, 14) + SourceIndex(5) -7 >Emitted(64, 16) Source(1, 16) + SourceIndex(5) -8 >Emitted(64, 17) Source(1, 17) + SourceIndex(5) +1->Emitted(59, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(59, 5) Source(1, 5) + SourceIndex(5) +3 >Emitted(59, 6) Source(1, 6) + SourceIndex(5) +4 >Emitted(59, 9) Source(1, 9) + SourceIndex(5) +5 >Emitted(59, 13) Source(1, 13) + SourceIndex(5) +6 >Emitted(59, 14) Source(1, 14) + SourceIndex(5) +7 >Emitted(59, 16) Source(1, 16) + SourceIndex(5) +8 >Emitted(59, 17) Source(1, 17) + SourceIndex(5) --- >>>c.doSomething(); 1-> @@ -1202,12 +1157,12 @@ sourceFile:../../third_part1.ts 4 > doSomething 5 > () 6 > ; -1->Emitted(65, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(65, 2) Source(2, 2) + SourceIndex(5) -3 >Emitted(65, 3) Source(2, 3) + SourceIndex(5) -4 >Emitted(65, 14) Source(2, 14) + SourceIndex(5) -5 >Emitted(65, 16) Source(2, 16) + SourceIndex(5) -6 >Emitted(65, 17) Source(2, 17) + SourceIndex(5) +1->Emitted(60, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(60, 2) Source(2, 2) + SourceIndex(5) +3 >Emitted(60, 3) Source(2, 3) + SourceIndex(5) +4 >Emitted(60, 14) Source(2, 14) + SourceIndex(5) +5 >Emitted(60, 16) Source(2, 16) + SourceIndex(5) +6 >Emitted(60, 17) Source(2, 17) + SourceIndex(5) --- >>>function forthirdthird_part1Rest() { 1-> @@ -1218,9 +1173,9 @@ sourceFile:../../third_part1.ts > 2 >function 3 > forthirdthird_part1Rest -1->Emitted(66, 1) Source(3, 1) + SourceIndex(5) -2 >Emitted(66, 10) Source(3, 10) + SourceIndex(5) -3 >Emitted(66, 33) Source(3, 33) + SourceIndex(5) +1->Emitted(61, 1) Source(3, 1) + SourceIndex(5) +2 >Emitted(61, 10) Source(3, 10) + SourceIndex(5) +3 >Emitted(61, 33) Source(3, 33) + SourceIndex(5) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -1274,31 +1229,31 @@ sourceFile:../../third_part1.ts 23> { b, ...rest } 24> = { a: 10, b: 30, yy: 30 } 25> ; -1->Emitted(67, 5) Source(4, 1) + SourceIndex(5) -2 >Emitted(67, 9) Source(4, 7) + SourceIndex(5) -3 >Emitted(67, 14) Source(4, 24) + SourceIndex(5) -4 >Emitted(67, 16) Source(4, 26) + SourceIndex(5) -5 >Emitted(67, 17) Source(4, 27) + SourceIndex(5) -6 >Emitted(67, 19) Source(4, 29) + SourceIndex(5) -7 >Emitted(67, 21) Source(4, 31) + SourceIndex(5) -8 >Emitted(67, 23) Source(4, 33) + SourceIndex(5) -9 >Emitted(67, 24) Source(4, 34) + SourceIndex(5) -10>Emitted(67, 26) Source(4, 36) + SourceIndex(5) -11>Emitted(67, 28) Source(4, 38) + SourceIndex(5) -12>Emitted(67, 30) Source(4, 40) + SourceIndex(5) -13>Emitted(67, 32) Source(4, 42) + SourceIndex(5) -14>Emitted(67, 34) Source(4, 44) + SourceIndex(5) -15>Emitted(67, 36) Source(4, 46) + SourceIndex(5) -16>Emitted(67, 38) Source(4, 48) + SourceIndex(5) -17>Emitted(67, 40) Source(4, 9) + SourceIndex(5) -18>Emitted(67, 41) Source(4, 10) + SourceIndex(5) -19>Emitted(67, 48) Source(4, 10) + SourceIndex(5) -20>Emitted(67, 50) Source(4, 15) + SourceIndex(5) -21>Emitted(67, 54) Source(4, 19) + SourceIndex(5) -22>Emitted(67, 68) Source(4, 7) + SourceIndex(5) -23>Emitted(67, 73) Source(4, 21) + SourceIndex(5) -24>Emitted(67, 74) Source(4, 48) + SourceIndex(5) -25>Emitted(67, 75) Source(4, 49) + SourceIndex(5) +1->Emitted(62, 5) Source(4, 1) + SourceIndex(5) +2 >Emitted(62, 9) Source(4, 7) + SourceIndex(5) +3 >Emitted(62, 14) Source(4, 24) + SourceIndex(5) +4 >Emitted(62, 16) Source(4, 26) + SourceIndex(5) +5 >Emitted(62, 17) Source(4, 27) + SourceIndex(5) +6 >Emitted(62, 19) Source(4, 29) + SourceIndex(5) +7 >Emitted(62, 21) Source(4, 31) + SourceIndex(5) +8 >Emitted(62, 23) Source(4, 33) + SourceIndex(5) +9 >Emitted(62, 24) Source(4, 34) + SourceIndex(5) +10>Emitted(62, 26) Source(4, 36) + SourceIndex(5) +11>Emitted(62, 28) Source(4, 38) + SourceIndex(5) +12>Emitted(62, 30) Source(4, 40) + SourceIndex(5) +13>Emitted(62, 32) Source(4, 42) + SourceIndex(5) +14>Emitted(62, 34) Source(4, 44) + SourceIndex(5) +15>Emitted(62, 36) Source(4, 46) + SourceIndex(5) +16>Emitted(62, 38) Source(4, 48) + SourceIndex(5) +17>Emitted(62, 40) Source(4, 9) + SourceIndex(5) +18>Emitted(62, 41) Source(4, 10) + SourceIndex(5) +19>Emitted(62, 48) Source(4, 10) + SourceIndex(5) +20>Emitted(62, 50) Source(4, 15) + SourceIndex(5) +21>Emitted(62, 54) Source(4, 19) + SourceIndex(5) +22>Emitted(62, 68) Source(4, 7) + SourceIndex(5) +23>Emitted(62, 73) Source(4, 21) + SourceIndex(5) +24>Emitted(62, 74) Source(4, 48) + SourceIndex(5) +25>Emitted(62, 75) Source(4, 49) + SourceIndex(5) --- >>>} 1 > @@ -1307,8 +1262,8 @@ sourceFile:../../third_part1.ts 1 > > 2 >} -1 >Emitted(68, 1) Source(5, 1) + SourceIndex(5) -2 >Emitted(68, 2) Source(5, 2) + SourceIndex(5) +1 >Emitted(63, 1) Source(5, 1) + SourceIndex(5) +2 >Emitted(63, 2) Source(5, 2) + SourceIndex(5) --- >>>//# sourceMappingURL=third-output.js.map @@ -1354,20 +1309,20 @@ sourceFile:../../third_part1.ts }, { "pos": 1424, - "end": 1925, + "end": 1815, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 1424, - "end": 1925, + "end": 1815, "kind": "text" } ] }, { - "pos": 1925, - "end": 2078, + "pos": 1815, + "end": 1968, "kind": "text" } ], @@ -1472,9 +1427,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (1424-1925):: ../../../2/second-output.js texts:: 1 +prepend: (1424-1815):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1424-1925) +text: (1424-1815) var N; (function (N) { function f() { @@ -1482,12 +1437,7 @@ var N; } f(); })(N || (N = {})); -function secondsecond_part1Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function secondsecond_part1Spread() { } secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30])); var C = (function () { function C() { @@ -1499,7 +1449,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (1925-2078) +text: (1815-1968) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js index b643b821abf1e..029597cce93ce 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js @@ -246,17 +246,12 @@ console.log(f()); function f() { return "JS does hoists"; } -function firstfirst_part3Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function firstfirst_part3Spread() { } firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); //# sourceMappingURL=first-output.js.map //// [/src/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB,KAAK,CAAC;ACXtC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB,KAAK,CAAC;ACXtC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AACD,SAAS,sBAAsB,KAAmB,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} //// [/src/first/bin/first-output.js.map.baseline.txt] =================================================================== @@ -431,71 +426,31 @@ sourceFile:../first_part3.ts >>>} 1 > 2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > 2 >} 1 >Emitted(27, 1) Source(3, 1) + SourceIndex(2) 2 >Emitted(27, 2) Source(3, 2) + SourceIndex(2) --- ->>>function firstfirst_part3Spread() { +>>>function firstfirst_part3Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >function 3 > firstfirst_part3Spread +4 > (...b: number[]) { +5 > } 1->Emitted(28, 1) Source(4, 1) + SourceIndex(2) 2 >Emitted(28, 10) Source(4, 10) + SourceIndex(2) 3 >Emitted(28, 32) Source(4, 32) + SourceIndex(2) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(29, 5) Source(4, 33) + SourceIndex(2) -2 >Emitted(29, 16) Source(4, 47) + SourceIndex(2) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(30, 10) Source(4, 33) + SourceIndex(2) -2 >Emitted(30, 20) Source(4, 47) + SourceIndex(2) -3 >Emitted(30, 22) Source(4, 33) + SourceIndex(2) -4 >Emitted(30, 43) Source(4, 47) + SourceIndex(2) -5 >Emitted(30, 45) Source(4, 33) + SourceIndex(2) -6 >Emitted(30, 49) Source(4, 47) + SourceIndex(2) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(31, 9) Source(4, 33) + SourceIndex(2) -2 >Emitted(31, 31) Source(4, 47) + SourceIndex(2) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(33, 1) Source(4, 51) + SourceIndex(2) -2 >Emitted(33, 2) Source(4, 52) + SourceIndex(2) +4 >Emitted(28, 37) Source(4, 51) + SourceIndex(2) +5 >Emitted(28, 38) Source(4, 52) + SourceIndex(2) --- >>>firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -521,17 +476,17 @@ sourceFile:../first_part3.ts 9 > 30 10> ] 11> ); -1->Emitted(34, 1) Source(5, 1) + SourceIndex(2) -2 >Emitted(34, 23) Source(5, 23) + SourceIndex(2) -3 >Emitted(34, 47) Source(5, 27) + SourceIndex(2) -4 >Emitted(34, 48) Source(5, 28) + SourceIndex(2) -5 >Emitted(34, 50) Source(5, 30) + SourceIndex(2) -6 >Emitted(34, 52) Source(5, 32) + SourceIndex(2) -7 >Emitted(34, 54) Source(5, 34) + SourceIndex(2) -8 >Emitted(34, 56) Source(5, 36) + SourceIndex(2) -9 >Emitted(34, 58) Source(5, 38) + SourceIndex(2) -10>Emitted(34, 59) Source(5, 39) + SourceIndex(2) -11>Emitted(34, 62) Source(5, 41) + SourceIndex(2) +1->Emitted(29, 1) Source(5, 1) + SourceIndex(2) +2 >Emitted(29, 23) Source(5, 23) + SourceIndex(2) +3 >Emitted(29, 47) Source(5, 27) + SourceIndex(2) +4 >Emitted(29, 48) Source(5, 28) + SourceIndex(2) +5 >Emitted(29, 50) Source(5, 30) + SourceIndex(2) +6 >Emitted(29, 52) Source(5, 32) + SourceIndex(2) +7 >Emitted(29, 54) Source(5, 34) + SourceIndex(2) +8 >Emitted(29, 56) Source(5, 36) + SourceIndex(2) +9 >Emitted(29, 58) Source(5, 38) + SourceIndex(2) +10>Emitted(29, 59) Source(5, 39) + SourceIndex(2) +11>Emitted(29, 62) Source(5, 41) + SourceIndex(2) --- >>>//# sourceMappingURL=first-output.js.map @@ -560,7 +515,7 @@ sourceFile:../first_part3.ts }, { "pos": 678, - "end": 1040, + "end": 930, "kind": "text" } ], @@ -612,7 +567,7 @@ var __spread = (this && this.__spread) || function () { return ar; }; ---------------------------------------------------------------------- -text: (678-1040) +text: (678-930) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { } @@ -620,12 +575,7 @@ console.log(f()); function f() { return "JS does hoists"; } -function firstfirst_part3Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function firstfirst_part3Spread() { } firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); ====================================================================== @@ -1075,12 +1025,7 @@ console.log(f()); function f() { return "JS does hoists"; } -function firstfirst_part3Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function firstfirst_part3Spread() { } firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); var N; (function (N) { @@ -1100,29 +1045,19 @@ var C = (function () { }; return C; }()); -function secondsecond_part2Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function secondsecond_part2Spread() { } secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); } -function thirdthird_part1Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function thirdthird_part1Spread() { } thirdthird_part1Spread.apply(void 0, __spread([10, 20, 30])); //# sourceMappingURL=third-output.js.map //// [/src/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB,KAAK,CAAC;ACXtC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACAxC,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;AAED,SAAS,wBAAwB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACP1C,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB,KAAK,CAAC;ACXtC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AACD,SAAS,sBAAsB,KAAmB,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACAxC,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;AAED,SAAS,wBAAwB,KAAmB,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACP1C,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;AACD,SAAS,sBAAsB,KAAmB,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} //// [/src/third/thirdjs/output/third-output.js.map.baseline.txt] =================================================================== @@ -1308,71 +1243,31 @@ sourceFile:../../../first/first_part3.ts >>>} 1 > 2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > 2 >} 1 >Emitted(38, 1) Source(3, 1) + SourceIndex(2) 2 >Emitted(38, 2) Source(3, 2) + SourceIndex(2) --- ->>>function firstfirst_part3Spread() { +>>>function firstfirst_part3Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >function 3 > firstfirst_part3Spread +4 > (...b: number[]) { +5 > } 1->Emitted(39, 1) Source(4, 1) + SourceIndex(2) 2 >Emitted(39, 10) Source(4, 10) + SourceIndex(2) 3 >Emitted(39, 32) Source(4, 32) + SourceIndex(2) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(40, 5) Source(4, 33) + SourceIndex(2) -2 >Emitted(40, 16) Source(4, 47) + SourceIndex(2) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(41, 10) Source(4, 33) + SourceIndex(2) -2 >Emitted(41, 20) Source(4, 47) + SourceIndex(2) -3 >Emitted(41, 22) Source(4, 33) + SourceIndex(2) -4 >Emitted(41, 43) Source(4, 47) + SourceIndex(2) -5 >Emitted(41, 45) Source(4, 33) + SourceIndex(2) -6 >Emitted(41, 49) Source(4, 47) + SourceIndex(2) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(42, 9) Source(4, 33) + SourceIndex(2) -2 >Emitted(42, 31) Source(4, 47) + SourceIndex(2) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(44, 1) Source(4, 51) + SourceIndex(2) -2 >Emitted(44, 2) Source(4, 52) + SourceIndex(2) +4 >Emitted(39, 37) Source(4, 51) + SourceIndex(2) +5 >Emitted(39, 38) Source(4, 52) + SourceIndex(2) --- >>>firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -1398,17 +1293,17 @@ sourceFile:../../../first/first_part3.ts 9 > 30 10> ] 11> ); -1->Emitted(45, 1) Source(5, 1) + SourceIndex(2) -2 >Emitted(45, 23) Source(5, 23) + SourceIndex(2) -3 >Emitted(45, 47) Source(5, 27) + SourceIndex(2) -4 >Emitted(45, 48) Source(5, 28) + SourceIndex(2) -5 >Emitted(45, 50) Source(5, 30) + SourceIndex(2) -6 >Emitted(45, 52) Source(5, 32) + SourceIndex(2) -7 >Emitted(45, 54) Source(5, 34) + SourceIndex(2) -8 >Emitted(45, 56) Source(5, 36) + SourceIndex(2) -9 >Emitted(45, 58) Source(5, 38) + SourceIndex(2) -10>Emitted(45, 59) Source(5, 39) + SourceIndex(2) -11>Emitted(45, 62) Source(5, 41) + SourceIndex(2) +1->Emitted(40, 1) Source(5, 1) + SourceIndex(2) +2 >Emitted(40, 23) Source(5, 23) + SourceIndex(2) +3 >Emitted(40, 47) Source(5, 27) + SourceIndex(2) +4 >Emitted(40, 48) Source(5, 28) + SourceIndex(2) +5 >Emitted(40, 50) Source(5, 30) + SourceIndex(2) +6 >Emitted(40, 52) Source(5, 32) + SourceIndex(2) +7 >Emitted(40, 54) Source(5, 34) + SourceIndex(2) +8 >Emitted(40, 56) Source(5, 36) + SourceIndex(2) +9 >Emitted(40, 58) Source(5, 38) + SourceIndex(2) +10>Emitted(40, 59) Source(5, 39) + SourceIndex(2) +11>Emitted(40, 62) Source(5, 41) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1434,10 +1329,10 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1 >Emitted(46, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(46, 5) Source(5, 11) + SourceIndex(3) -3 >Emitted(46, 6) Source(5, 12) + SourceIndex(3) -4 >Emitted(46, 7) Source(11, 2) + SourceIndex(3) +1 >Emitted(41, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(41, 5) Source(5, 11) + SourceIndex(3) +3 >Emitted(41, 6) Source(5, 12) + SourceIndex(3) +4 >Emitted(41, 7) Source(11, 2) + SourceIndex(3) --- >>>(function (N) { 1-> @@ -1447,9 +1342,9 @@ sourceFile:../../../second/second_part1.ts 1-> 2 >namespace 3 > N -1->Emitted(47, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(47, 12) Source(5, 11) + SourceIndex(3) -3 >Emitted(47, 13) Source(5, 12) + SourceIndex(3) +1->Emitted(42, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(42, 12) Source(5, 11) + SourceIndex(3) +3 >Emitted(42, 13) Source(5, 12) + SourceIndex(3) --- >>> function f() { 1->^^^^ @@ -1460,9 +1355,9 @@ sourceFile:../../../second/second_part1.ts > 2 > function 3 > f -1->Emitted(48, 5) Source(6, 5) + SourceIndex(3) -2 >Emitted(48, 14) Source(6, 14) + SourceIndex(3) -3 >Emitted(48, 15) Source(6, 15) + SourceIndex(3) +1->Emitted(43, 5) Source(6, 5) + SourceIndex(3) +2 >Emitted(43, 14) Source(6, 14) + SourceIndex(3) +3 >Emitted(43, 15) Source(6, 15) + SourceIndex(3) --- >>> console.log('testing'); 1->^^^^^^^^ @@ -1482,14 +1377,14 @@ sourceFile:../../../second/second_part1.ts 6 > 'testing' 7 > ) 8 > ; -1->Emitted(49, 9) Source(7, 9) + SourceIndex(3) -2 >Emitted(49, 16) Source(7, 16) + SourceIndex(3) -3 >Emitted(49, 17) Source(7, 17) + SourceIndex(3) -4 >Emitted(49, 20) Source(7, 20) + SourceIndex(3) -5 >Emitted(49, 21) Source(7, 21) + SourceIndex(3) -6 >Emitted(49, 30) Source(7, 30) + SourceIndex(3) -7 >Emitted(49, 31) Source(7, 31) + SourceIndex(3) -8 >Emitted(49, 32) Source(7, 32) + SourceIndex(3) +1->Emitted(44, 9) Source(7, 9) + SourceIndex(3) +2 >Emitted(44, 16) Source(7, 16) + SourceIndex(3) +3 >Emitted(44, 17) Source(7, 17) + SourceIndex(3) +4 >Emitted(44, 20) Source(7, 20) + SourceIndex(3) +5 >Emitted(44, 21) Source(7, 21) + SourceIndex(3) +6 >Emitted(44, 30) Source(7, 30) + SourceIndex(3) +7 >Emitted(44, 31) Source(7, 31) + SourceIndex(3) +8 >Emitted(44, 32) Source(7, 32) + SourceIndex(3) --- >>> } 1 >^^^^ @@ -1498,8 +1393,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 > } -1 >Emitted(50, 5) Source(8, 5) + SourceIndex(3) -2 >Emitted(50, 6) Source(8, 6) + SourceIndex(3) +1 >Emitted(45, 5) Source(8, 5) + SourceIndex(3) +2 >Emitted(45, 6) Source(8, 6) + SourceIndex(3) --- >>> f(); 1->^^^^ @@ -1513,10 +1408,10 @@ sourceFile:../../../second/second_part1.ts 2 > f 3 > () 4 > ; -1->Emitted(51, 5) Source(10, 5) + SourceIndex(3) -2 >Emitted(51, 6) Source(10, 6) + SourceIndex(3) -3 >Emitted(51, 8) Source(10, 8) + SourceIndex(3) -4 >Emitted(51, 9) Source(10, 9) + SourceIndex(3) +1->Emitted(46, 5) Source(10, 5) + SourceIndex(3) +2 >Emitted(46, 6) Source(10, 6) + SourceIndex(3) +3 >Emitted(46, 8) Source(10, 8) + SourceIndex(3) +4 >Emitted(46, 9) Source(10, 9) + SourceIndex(3) --- >>>})(N || (N = {})); 1-> @@ -1541,13 +1436,13 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(52, 1) Source(11, 1) + SourceIndex(3) -2 >Emitted(52, 2) Source(11, 2) + SourceIndex(3) -3 >Emitted(52, 4) Source(5, 11) + SourceIndex(3) -4 >Emitted(52, 5) Source(5, 12) + SourceIndex(3) -5 >Emitted(52, 10) Source(5, 11) + SourceIndex(3) -6 >Emitted(52, 11) Source(5, 12) + SourceIndex(3) -7 >Emitted(52, 19) Source(11, 2) + SourceIndex(3) +1->Emitted(47, 1) Source(11, 1) + SourceIndex(3) +2 >Emitted(47, 2) Source(11, 2) + SourceIndex(3) +3 >Emitted(47, 4) Source(5, 11) + SourceIndex(3) +4 >Emitted(47, 5) Source(5, 12) + SourceIndex(3) +5 >Emitted(47, 10) Source(5, 11) + SourceIndex(3) +6 >Emitted(47, 11) Source(5, 12) + SourceIndex(3) +7 >Emitted(47, 19) Source(11, 2) + SourceIndex(3) --- >>>function forsecondsecond_part1Rest() { 1-> @@ -1558,9 +1453,9 @@ sourceFile:../../../second/second_part1.ts > 2 >function 3 > forsecondsecond_part1Rest -1->Emitted(53, 1) Source(12, 1) + SourceIndex(3) -2 >Emitted(53, 10) Source(12, 10) + SourceIndex(3) -3 >Emitted(53, 35) Source(12, 35) + SourceIndex(3) +1->Emitted(48, 1) Source(12, 1) + SourceIndex(3) +2 >Emitted(48, 10) Source(12, 10) + SourceIndex(3) +3 >Emitted(48, 35) Source(12, 35) + SourceIndex(3) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -1614,31 +1509,31 @@ sourceFile:../../../second/second_part1.ts 23> { b, ...rest } 24> = { a: 10, b: 30, yy: 30 } 25> ; -1->Emitted(54, 5) Source(13, 1) + SourceIndex(3) -2 >Emitted(54, 9) Source(13, 7) + SourceIndex(3) -3 >Emitted(54, 14) Source(13, 24) + SourceIndex(3) -4 >Emitted(54, 16) Source(13, 26) + SourceIndex(3) -5 >Emitted(54, 17) Source(13, 27) + SourceIndex(3) -6 >Emitted(54, 19) Source(13, 29) + SourceIndex(3) -7 >Emitted(54, 21) Source(13, 31) + SourceIndex(3) -8 >Emitted(54, 23) Source(13, 33) + SourceIndex(3) -9 >Emitted(54, 24) Source(13, 34) + SourceIndex(3) -10>Emitted(54, 26) Source(13, 36) + SourceIndex(3) -11>Emitted(54, 28) Source(13, 38) + SourceIndex(3) -12>Emitted(54, 30) Source(13, 40) + SourceIndex(3) -13>Emitted(54, 32) Source(13, 42) + SourceIndex(3) -14>Emitted(54, 34) Source(13, 44) + SourceIndex(3) -15>Emitted(54, 36) Source(13, 46) + SourceIndex(3) -16>Emitted(54, 38) Source(13, 48) + SourceIndex(3) -17>Emitted(54, 40) Source(13, 9) + SourceIndex(3) -18>Emitted(54, 41) Source(13, 10) + SourceIndex(3) -19>Emitted(54, 48) Source(13, 10) + SourceIndex(3) -20>Emitted(54, 50) Source(13, 15) + SourceIndex(3) -21>Emitted(54, 54) Source(13, 19) + SourceIndex(3) -22>Emitted(54, 68) Source(13, 7) + SourceIndex(3) -23>Emitted(54, 73) Source(13, 21) + SourceIndex(3) -24>Emitted(54, 74) Source(13, 48) + SourceIndex(3) -25>Emitted(54, 75) Source(13, 49) + SourceIndex(3) +1->Emitted(49, 5) Source(13, 1) + SourceIndex(3) +2 >Emitted(49, 9) Source(13, 7) + SourceIndex(3) +3 >Emitted(49, 14) Source(13, 24) + SourceIndex(3) +4 >Emitted(49, 16) Source(13, 26) + SourceIndex(3) +5 >Emitted(49, 17) Source(13, 27) + SourceIndex(3) +6 >Emitted(49, 19) Source(13, 29) + SourceIndex(3) +7 >Emitted(49, 21) Source(13, 31) + SourceIndex(3) +8 >Emitted(49, 23) Source(13, 33) + SourceIndex(3) +9 >Emitted(49, 24) Source(13, 34) + SourceIndex(3) +10>Emitted(49, 26) Source(13, 36) + SourceIndex(3) +11>Emitted(49, 28) Source(13, 38) + SourceIndex(3) +12>Emitted(49, 30) Source(13, 40) + SourceIndex(3) +13>Emitted(49, 32) Source(13, 42) + SourceIndex(3) +14>Emitted(49, 34) Source(13, 44) + SourceIndex(3) +15>Emitted(49, 36) Source(13, 46) + SourceIndex(3) +16>Emitted(49, 38) Source(13, 48) + SourceIndex(3) +17>Emitted(49, 40) Source(13, 9) + SourceIndex(3) +18>Emitted(49, 41) Source(13, 10) + SourceIndex(3) +19>Emitted(49, 48) Source(13, 10) + SourceIndex(3) +20>Emitted(49, 50) Source(13, 15) + SourceIndex(3) +21>Emitted(49, 54) Source(13, 19) + SourceIndex(3) +22>Emitted(49, 68) Source(13, 7) + SourceIndex(3) +23>Emitted(49, 73) Source(13, 21) + SourceIndex(3) +24>Emitted(49, 74) Source(13, 48) + SourceIndex(3) +25>Emitted(49, 75) Source(13, 49) + SourceIndex(3) --- >>>} 1 > @@ -1647,8 +1542,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 >} -1 >Emitted(55, 1) Source(14, 1) + SourceIndex(3) -2 >Emitted(55, 2) Source(14, 2) + SourceIndex(3) +1 >Emitted(50, 1) Source(14, 1) + SourceIndex(3) +2 >Emitted(50, 2) Source(14, 2) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1658,13 +1553,13 @@ sourceFile:../../../second/second_part2.ts 1-> 2 >^^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(56, 1) Source(1, 1) + SourceIndex(4) +1->Emitted(51, 1) Source(1, 1) + SourceIndex(4) --- >>> function C() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(57, 5) Source(1, 1) + SourceIndex(4) +1->Emitted(52, 5) Source(1, 1) + SourceIndex(4) --- >>> } 1->^^^^ @@ -1676,8 +1571,8 @@ sourceFile:../../../second/second_part2.ts > } > 2 > } -1->Emitted(58, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(58, 6) Source(5, 2) + SourceIndex(4) +1->Emitted(53, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(53, 6) Source(5, 2) + SourceIndex(4) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -1687,9 +1582,9 @@ sourceFile:../../../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(59, 5) Source(2, 5) + SourceIndex(4) -2 >Emitted(59, 28) Source(2, 16) + SourceIndex(4) -3 >Emitted(59, 31) Source(2, 5) + SourceIndex(4) +1->Emitted(54, 5) Source(2, 5) + SourceIndex(4) +2 >Emitted(54, 28) Source(2, 16) + SourceIndex(4) +3 >Emitted(54, 31) Source(2, 5) + SourceIndex(4) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -1709,14 +1604,14 @@ sourceFile:../../../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(60, 9) Source(3, 9) + SourceIndex(4) -2 >Emitted(60, 16) Source(3, 16) + SourceIndex(4) -3 >Emitted(60, 17) Source(3, 17) + SourceIndex(4) -4 >Emitted(60, 20) Source(3, 20) + SourceIndex(4) -5 >Emitted(60, 21) Source(3, 21) + SourceIndex(4) -6 >Emitted(60, 41) Source(3, 41) + SourceIndex(4) -7 >Emitted(60, 42) Source(3, 42) + SourceIndex(4) -8 >Emitted(60, 43) Source(3, 43) + SourceIndex(4) +1->Emitted(55, 9) Source(3, 9) + SourceIndex(4) +2 >Emitted(55, 16) Source(3, 16) + SourceIndex(4) +3 >Emitted(55, 17) Source(3, 17) + SourceIndex(4) +4 >Emitted(55, 20) Source(3, 20) + SourceIndex(4) +5 >Emitted(55, 21) Source(3, 21) + SourceIndex(4) +6 >Emitted(55, 41) Source(3, 41) + SourceIndex(4) +7 >Emitted(55, 42) Source(3, 42) + SourceIndex(4) +8 >Emitted(55, 43) Source(3, 43) + SourceIndex(4) --- >>> }; 1 >^^^^ @@ -1725,8 +1620,8 @@ sourceFile:../../../second/second_part2.ts 1 > > 2 > } -1 >Emitted(61, 5) Source(4, 5) + SourceIndex(4) -2 >Emitted(61, 6) Source(4, 6) + SourceIndex(4) +1 >Emitted(56, 5) Source(4, 5) + SourceIndex(4) +2 >Emitted(56, 6) Source(4, 6) + SourceIndex(4) --- >>> return C; 1->^^^^ @@ -1734,15 +1629,15 @@ sourceFile:../../../second/second_part2.ts 1-> > 2 > } -1->Emitted(62, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(62, 13) Source(5, 2) + SourceIndex(4) +1->Emitted(57, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(57, 13) Source(5, 2) + SourceIndex(4) --- >>>}()); 1 > 2 >^ 3 > 4 > ^^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 2 >} 3 > @@ -1751,70 +1646,30 @@ sourceFile:../../../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(63, 1) Source(5, 1) + SourceIndex(4) -2 >Emitted(63, 2) Source(5, 2) + SourceIndex(4) -3 >Emitted(63, 2) Source(1, 1) + SourceIndex(4) -4 >Emitted(63, 6) Source(5, 2) + SourceIndex(4) +1 >Emitted(58, 1) Source(5, 1) + SourceIndex(4) +2 >Emitted(58, 2) Source(5, 2) + SourceIndex(4) +3 >Emitted(58, 2) Source(1, 1) + SourceIndex(4) +4 >Emitted(58, 6) Source(5, 2) + SourceIndex(4) --- ->>>function secondsecond_part2Spread() { +>>>function secondsecond_part2Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > 2 >function 3 > secondsecond_part2Spread -1->Emitted(64, 1) Source(7, 1) + SourceIndex(4) -2 >Emitted(64, 10) Source(7, 10) + SourceIndex(4) -3 >Emitted(64, 34) Source(7, 34) + SourceIndex(4) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(65, 5) Source(7, 35) + SourceIndex(4) -2 >Emitted(65, 16) Source(7, 49) + SourceIndex(4) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(66, 10) Source(7, 35) + SourceIndex(4) -2 >Emitted(66, 20) Source(7, 49) + SourceIndex(4) -3 >Emitted(66, 22) Source(7, 35) + SourceIndex(4) -4 >Emitted(66, 43) Source(7, 49) + SourceIndex(4) -5 >Emitted(66, 45) Source(7, 35) + SourceIndex(4) -6 >Emitted(66, 49) Source(7, 49) + SourceIndex(4) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(67, 9) Source(7, 35) + SourceIndex(4) -2 >Emitted(67, 31) Source(7, 49) + SourceIndex(4) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(69, 1) Source(7, 53) + SourceIndex(4) -2 >Emitted(69, 2) Source(7, 54) + SourceIndex(4) +4 > (...b: number[]) { +5 > } +1->Emitted(59, 1) Source(7, 1) + SourceIndex(4) +2 >Emitted(59, 10) Source(7, 10) + SourceIndex(4) +3 >Emitted(59, 34) Source(7, 34) + SourceIndex(4) +4 >Emitted(59, 39) Source(7, 53) + SourceIndex(4) +5 >Emitted(59, 40) Source(7, 54) + SourceIndex(4) --- >>>secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -1840,17 +1695,17 @@ sourceFile:../../../second/second_part2.ts 9 > 30 10> ] 11> ); -1->Emitted(70, 1) Source(8, 1) + SourceIndex(4) -2 >Emitted(70, 25) Source(8, 25) + SourceIndex(4) -3 >Emitted(70, 49) Source(8, 29) + SourceIndex(4) -4 >Emitted(70, 50) Source(8, 30) + SourceIndex(4) -5 >Emitted(70, 52) Source(8, 32) + SourceIndex(4) -6 >Emitted(70, 54) Source(8, 34) + SourceIndex(4) -7 >Emitted(70, 56) Source(8, 36) + SourceIndex(4) -8 >Emitted(70, 58) Source(8, 38) + SourceIndex(4) -9 >Emitted(70, 60) Source(8, 40) + SourceIndex(4) -10>Emitted(70, 61) Source(8, 41) + SourceIndex(4) -11>Emitted(70, 64) Source(8, 43) + SourceIndex(4) +1->Emitted(60, 1) Source(8, 1) + SourceIndex(4) +2 >Emitted(60, 25) Source(8, 25) + SourceIndex(4) +3 >Emitted(60, 49) Source(8, 29) + SourceIndex(4) +4 >Emitted(60, 50) Source(8, 30) + SourceIndex(4) +5 >Emitted(60, 52) Source(8, 32) + SourceIndex(4) +6 >Emitted(60, 54) Source(8, 34) + SourceIndex(4) +7 >Emitted(60, 56) Source(8, 36) + SourceIndex(4) +8 >Emitted(60, 58) Source(8, 38) + SourceIndex(4) +9 >Emitted(60, 60) Source(8, 40) + SourceIndex(4) +10>Emitted(60, 61) Source(8, 41) + SourceIndex(4) +11>Emitted(60, 64) Source(8, 43) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1874,14 +1729,14 @@ sourceFile:../../third_part1.ts 6 > C 7 > () 8 > ; -1 >Emitted(71, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(71, 5) Source(1, 5) + SourceIndex(5) -3 >Emitted(71, 6) Source(1, 6) + SourceIndex(5) -4 >Emitted(71, 9) Source(1, 9) + SourceIndex(5) -5 >Emitted(71, 13) Source(1, 13) + SourceIndex(5) -6 >Emitted(71, 14) Source(1, 14) + SourceIndex(5) -7 >Emitted(71, 16) Source(1, 16) + SourceIndex(5) -8 >Emitted(71, 17) Source(1, 17) + SourceIndex(5) +1 >Emitted(61, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(61, 5) Source(1, 5) + SourceIndex(5) +3 >Emitted(61, 6) Source(1, 6) + SourceIndex(5) +4 >Emitted(61, 9) Source(1, 9) + SourceIndex(5) +5 >Emitted(61, 13) Source(1, 13) + SourceIndex(5) +6 >Emitted(61, 14) Source(1, 14) + SourceIndex(5) +7 >Emitted(61, 16) Source(1, 16) + SourceIndex(5) +8 >Emitted(61, 17) Source(1, 17) + SourceIndex(5) --- >>>c.doSomething(); 1-> @@ -1898,12 +1753,12 @@ sourceFile:../../third_part1.ts 4 > doSomething 5 > () 6 > ; -1->Emitted(72, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(72, 2) Source(2, 2) + SourceIndex(5) -3 >Emitted(72, 3) Source(2, 3) + SourceIndex(5) -4 >Emitted(72, 14) Source(2, 14) + SourceIndex(5) -5 >Emitted(72, 16) Source(2, 16) + SourceIndex(5) -6 >Emitted(72, 17) Source(2, 17) + SourceIndex(5) +1->Emitted(62, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(62, 2) Source(2, 2) + SourceIndex(5) +3 >Emitted(62, 3) Source(2, 3) + SourceIndex(5) +4 >Emitted(62, 14) Source(2, 14) + SourceIndex(5) +5 >Emitted(62, 16) Source(2, 16) + SourceIndex(5) +6 >Emitted(62, 17) Source(2, 17) + SourceIndex(5) --- >>>function forthirdthird_part1Rest() { 1-> @@ -1914,9 +1769,9 @@ sourceFile:../../third_part1.ts > 2 >function 3 > forthirdthird_part1Rest -1->Emitted(73, 1) Source(3, 1) + SourceIndex(5) -2 >Emitted(73, 10) Source(3, 10) + SourceIndex(5) -3 >Emitted(73, 33) Source(3, 33) + SourceIndex(5) +1->Emitted(63, 1) Source(3, 1) + SourceIndex(5) +2 >Emitted(63, 10) Source(3, 10) + SourceIndex(5) +3 >Emitted(63, 33) Source(3, 33) + SourceIndex(5) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -1970,100 +1825,60 @@ sourceFile:../../third_part1.ts 23> { b, ...rest } 24> = { a: 10, b: 30, yy: 30 } 25> ; -1->Emitted(74, 5) Source(4, 1) + SourceIndex(5) -2 >Emitted(74, 9) Source(4, 7) + SourceIndex(5) -3 >Emitted(74, 14) Source(4, 24) + SourceIndex(5) -4 >Emitted(74, 16) Source(4, 26) + SourceIndex(5) -5 >Emitted(74, 17) Source(4, 27) + SourceIndex(5) -6 >Emitted(74, 19) Source(4, 29) + SourceIndex(5) -7 >Emitted(74, 21) Source(4, 31) + SourceIndex(5) -8 >Emitted(74, 23) Source(4, 33) + SourceIndex(5) -9 >Emitted(74, 24) Source(4, 34) + SourceIndex(5) -10>Emitted(74, 26) Source(4, 36) + SourceIndex(5) -11>Emitted(74, 28) Source(4, 38) + SourceIndex(5) -12>Emitted(74, 30) Source(4, 40) + SourceIndex(5) -13>Emitted(74, 32) Source(4, 42) + SourceIndex(5) -14>Emitted(74, 34) Source(4, 44) + SourceIndex(5) -15>Emitted(74, 36) Source(4, 46) + SourceIndex(5) -16>Emitted(74, 38) Source(4, 48) + SourceIndex(5) -17>Emitted(74, 40) Source(4, 9) + SourceIndex(5) -18>Emitted(74, 41) Source(4, 10) + SourceIndex(5) -19>Emitted(74, 48) Source(4, 10) + SourceIndex(5) -20>Emitted(74, 50) Source(4, 15) + SourceIndex(5) -21>Emitted(74, 54) Source(4, 19) + SourceIndex(5) -22>Emitted(74, 68) Source(4, 7) + SourceIndex(5) -23>Emitted(74, 73) Source(4, 21) + SourceIndex(5) -24>Emitted(74, 74) Source(4, 48) + SourceIndex(5) -25>Emitted(74, 75) Source(4, 49) + SourceIndex(5) +1->Emitted(64, 5) Source(4, 1) + SourceIndex(5) +2 >Emitted(64, 9) Source(4, 7) + SourceIndex(5) +3 >Emitted(64, 14) Source(4, 24) + SourceIndex(5) +4 >Emitted(64, 16) Source(4, 26) + SourceIndex(5) +5 >Emitted(64, 17) Source(4, 27) + SourceIndex(5) +6 >Emitted(64, 19) Source(4, 29) + SourceIndex(5) +7 >Emitted(64, 21) Source(4, 31) + SourceIndex(5) +8 >Emitted(64, 23) Source(4, 33) + SourceIndex(5) +9 >Emitted(64, 24) Source(4, 34) + SourceIndex(5) +10>Emitted(64, 26) Source(4, 36) + SourceIndex(5) +11>Emitted(64, 28) Source(4, 38) + SourceIndex(5) +12>Emitted(64, 30) Source(4, 40) + SourceIndex(5) +13>Emitted(64, 32) Source(4, 42) + SourceIndex(5) +14>Emitted(64, 34) Source(4, 44) + SourceIndex(5) +15>Emitted(64, 36) Source(4, 46) + SourceIndex(5) +16>Emitted(64, 38) Source(4, 48) + SourceIndex(5) +17>Emitted(64, 40) Source(4, 9) + SourceIndex(5) +18>Emitted(64, 41) Source(4, 10) + SourceIndex(5) +19>Emitted(64, 48) Source(4, 10) + SourceIndex(5) +20>Emitted(64, 50) Source(4, 15) + SourceIndex(5) +21>Emitted(64, 54) Source(4, 19) + SourceIndex(5) +22>Emitted(64, 68) Source(4, 7) + SourceIndex(5) +23>Emitted(64, 73) Source(4, 21) + SourceIndex(5) +24>Emitted(64, 74) Source(4, 48) + SourceIndex(5) +25>Emitted(64, 75) Source(4, 49) + SourceIndex(5) --- >>>} 1 > 2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > 2 >} -1 >Emitted(75, 1) Source(5, 1) + SourceIndex(5) -2 >Emitted(75, 2) Source(5, 2) + SourceIndex(5) +1 >Emitted(65, 1) Source(5, 1) + SourceIndex(5) +2 >Emitted(65, 2) Source(5, 2) + SourceIndex(5) --- ->>>function thirdthird_part1Spread() { +>>>function thirdthird_part1Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >function 3 > thirdthird_part1Spread -1->Emitted(76, 1) Source(6, 1) + SourceIndex(5) -2 >Emitted(76, 10) Source(6, 10) + SourceIndex(5) -3 >Emitted(76, 32) Source(6, 32) + SourceIndex(5) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(77, 5) Source(6, 33) + SourceIndex(5) -2 >Emitted(77, 16) Source(6, 47) + SourceIndex(5) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(78, 10) Source(6, 33) + SourceIndex(5) -2 >Emitted(78, 20) Source(6, 47) + SourceIndex(5) -3 >Emitted(78, 22) Source(6, 33) + SourceIndex(5) -4 >Emitted(78, 43) Source(6, 47) + SourceIndex(5) -5 >Emitted(78, 45) Source(6, 33) + SourceIndex(5) -6 >Emitted(78, 49) Source(6, 47) + SourceIndex(5) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(79, 9) Source(6, 33) + SourceIndex(5) -2 >Emitted(79, 31) Source(6, 47) + SourceIndex(5) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(81, 1) Source(6, 51) + SourceIndex(5) -2 >Emitted(81, 2) Source(6, 52) + SourceIndex(5) +4 > (...b: number[]) { +5 > } +1->Emitted(66, 1) Source(6, 1) + SourceIndex(5) +2 >Emitted(66, 10) Source(6, 10) + SourceIndex(5) +3 >Emitted(66, 32) Source(6, 32) + SourceIndex(5) +4 >Emitted(66, 37) Source(6, 51) + SourceIndex(5) +5 >Emitted(66, 38) Source(6, 52) + SourceIndex(5) --- >>>thirdthird_part1Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -2089,17 +1904,17 @@ sourceFile:../../third_part1.ts 9 > 30 10> ] 11> ); -1->Emitted(82, 1) Source(7, 1) + SourceIndex(5) -2 >Emitted(82, 23) Source(7, 23) + SourceIndex(5) -3 >Emitted(82, 47) Source(7, 27) + SourceIndex(5) -4 >Emitted(82, 48) Source(7, 28) + SourceIndex(5) -5 >Emitted(82, 50) Source(7, 30) + SourceIndex(5) -6 >Emitted(82, 52) Source(7, 32) + SourceIndex(5) -7 >Emitted(82, 54) Source(7, 34) + SourceIndex(5) -8 >Emitted(82, 56) Source(7, 36) + SourceIndex(5) -9 >Emitted(82, 58) Source(7, 38) + SourceIndex(5) -10>Emitted(82, 59) Source(7, 39) + SourceIndex(5) -11>Emitted(82, 62) Source(7, 41) + SourceIndex(5) +1->Emitted(67, 1) Source(7, 1) + SourceIndex(5) +2 >Emitted(67, 23) Source(7, 23) + SourceIndex(5) +3 >Emitted(67, 47) Source(7, 27) + SourceIndex(5) +4 >Emitted(67, 48) Source(7, 28) + SourceIndex(5) +5 >Emitted(67, 50) Source(7, 30) + SourceIndex(5) +6 >Emitted(67, 52) Source(7, 32) + SourceIndex(5) +7 >Emitted(67, 54) Source(7, 34) + SourceIndex(5) +8 >Emitted(67, 56) Source(7, 36) + SourceIndex(5) +9 >Emitted(67, 58) Source(7, 38) + SourceIndex(5) +10>Emitted(67, 59) Source(7, 39) + SourceIndex(5) +11>Emitted(67, 62) Source(7, 41) + SourceIndex(5) --- >>>//# sourceMappingURL=third-output.js.map @@ -2132,33 +1947,33 @@ sourceFile:../../third_part1.ts }, { "pos": 1180, - "end": 1542, + "end": 1432, "kind": "prepend", "data": "../../../first/bin/first-output.js", "texts": [ { "pos": 1180, - "end": 1542, + "end": 1432, "kind": "text" } ] }, { - "pos": 1542, - "end": 2162, + "pos": 1432, + "end": 1942, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { - "pos": 1542, - "end": 2162, + "pos": 1432, + "end": 1942, "kind": "text" } ] }, { - "pos": 2162, - "end": 2527, + "pos": 1942, + "end": 2197, "kind": "text" } ], @@ -2250,9 +2065,9 @@ var __rest = (this && this.__rest) || function (s, e) { return t; }; ---------------------------------------------------------------------- -prepend: (1180-1542):: ../../../first/bin/first-output.js texts:: 1 +prepend: (1180-1432):: ../../../first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1180-1542) +text: (1180-1432) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { } @@ -2260,18 +2075,13 @@ console.log(f()); function f() { return "JS does hoists"; } -function firstfirst_part3Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function firstfirst_part3Spread() { } firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); ---------------------------------------------------------------------- -prepend: (1542-2162):: ../../../2/second-output.js texts:: 1 +prepend: (1432-1942):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1542-2162) +text: (1432-1942) var N; (function (N) { function f() { @@ -2290,27 +2100,17 @@ var C = (function () { }; return C; }()); -function secondsecond_part2Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function secondsecond_part2Spread() { } secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); ---------------------------------------------------------------------- -text: (2162-2527) +text: (1942-2197) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); } -function thirdthird_part1Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function thirdthird_part1Spread() { } thirdthird_part1Spread.apply(void 0, __spread([10, 20, 30])); ====================================================================== diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-different-projects.js index 416f702fff33b..8e1bd801452e6 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-different-projects.js @@ -781,12 +781,7 @@ var N; } f(); })(N || (N = {})); -function secondsecond_part1Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function secondsecond_part1Spread() { } secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30])); var C = (function () { function C() { @@ -804,7 +799,7 @@ function forthirdthird_part1Rest() { //# sourceMappingURL=third-output.js.map //// [/src/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB,KAAK,CAAC;ACXtC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AAED,SAAS,wBAAwB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACb1C;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB,KAAK,CAAC;ACXtC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AAED,SAAS,wBAAwB,KAAmB,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACb1C;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC"} //// [/src/third/thirdjs/output/third-output.js.map.baseline.txt] =================================================================== @@ -1113,7 +1108,7 @@ sourceFile:../../../second/second_part1.ts 5 > ^^^^^ 6 > ^ 7 > ^^^^^^^^ -8 > ^^^^^^^^^^^^^^^^^^^^-> +8 > ^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >} @@ -1136,65 +1131,25 @@ sourceFile:../../../second/second_part1.ts 6 >Emitted(45, 11) Source(5, 12) + SourceIndex(3) 7 >Emitted(45, 19) Source(11, 2) + SourceIndex(3) --- ->>>function secondsecond_part1Spread() { +>>>function secondsecond_part1Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > 2 >function 3 > secondsecond_part1Spread +4 > (...b: number[]) { +5 > } 1->Emitted(46, 1) Source(13, 1) + SourceIndex(3) 2 >Emitted(46, 10) Source(13, 10) + SourceIndex(3) 3 >Emitted(46, 34) Source(13, 34) + SourceIndex(3) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(47, 5) Source(13, 35) + SourceIndex(3) -2 >Emitted(47, 16) Source(13, 49) + SourceIndex(3) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(48, 10) Source(13, 35) + SourceIndex(3) -2 >Emitted(48, 20) Source(13, 49) + SourceIndex(3) -3 >Emitted(48, 22) Source(13, 35) + SourceIndex(3) -4 >Emitted(48, 43) Source(13, 49) + SourceIndex(3) -5 >Emitted(48, 45) Source(13, 35) + SourceIndex(3) -6 >Emitted(48, 49) Source(13, 49) + SourceIndex(3) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(49, 9) Source(13, 35) + SourceIndex(3) -2 >Emitted(49, 31) Source(13, 49) + SourceIndex(3) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(51, 1) Source(13, 53) + SourceIndex(3) -2 >Emitted(51, 2) Source(13, 54) + SourceIndex(3) +4 >Emitted(46, 39) Source(13, 53) + SourceIndex(3) +5 >Emitted(46, 40) Source(13, 54) + SourceIndex(3) --- >>>secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -1220,17 +1175,17 @@ sourceFile:../../../second/second_part1.ts 9 > 30 10> ] 11> ); -1->Emitted(52, 1) Source(14, 1) + SourceIndex(3) -2 >Emitted(52, 25) Source(14, 25) + SourceIndex(3) -3 >Emitted(52, 49) Source(14, 29) + SourceIndex(3) -4 >Emitted(52, 50) Source(14, 30) + SourceIndex(3) -5 >Emitted(52, 52) Source(14, 32) + SourceIndex(3) -6 >Emitted(52, 54) Source(14, 34) + SourceIndex(3) -7 >Emitted(52, 56) Source(14, 36) + SourceIndex(3) -8 >Emitted(52, 58) Source(14, 38) + SourceIndex(3) -9 >Emitted(52, 60) Source(14, 40) + SourceIndex(3) -10>Emitted(52, 61) Source(14, 41) + SourceIndex(3) -11>Emitted(52, 64) Source(14, 43) + SourceIndex(3) +1->Emitted(47, 1) Source(14, 1) + SourceIndex(3) +2 >Emitted(47, 25) Source(14, 25) + SourceIndex(3) +3 >Emitted(47, 49) Source(14, 29) + SourceIndex(3) +4 >Emitted(47, 50) Source(14, 30) + SourceIndex(3) +5 >Emitted(47, 52) Source(14, 32) + SourceIndex(3) +6 >Emitted(47, 54) Source(14, 34) + SourceIndex(3) +7 >Emitted(47, 56) Source(14, 36) + SourceIndex(3) +8 >Emitted(47, 58) Source(14, 38) + SourceIndex(3) +9 >Emitted(47, 60) Source(14, 40) + SourceIndex(3) +10>Emitted(47, 61) Source(14, 41) + SourceIndex(3) +11>Emitted(47, 64) Source(14, 43) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1240,13 +1195,13 @@ sourceFile:../../../second/second_part2.ts 1 > 2 >^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(53, 1) Source(1, 1) + SourceIndex(4) +1 >Emitted(48, 1) Source(1, 1) + SourceIndex(4) --- >>> function C() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(54, 5) Source(1, 1) + SourceIndex(4) +1->Emitted(49, 5) Source(1, 1) + SourceIndex(4) --- >>> } 1->^^^^ @@ -1258,8 +1213,8 @@ sourceFile:../../../second/second_part2.ts > } > 2 > } -1->Emitted(55, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(55, 6) Source(5, 2) + SourceIndex(4) +1->Emitted(50, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(50, 6) Source(5, 2) + SourceIndex(4) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -1269,9 +1224,9 @@ sourceFile:../../../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(56, 5) Source(2, 5) + SourceIndex(4) -2 >Emitted(56, 28) Source(2, 16) + SourceIndex(4) -3 >Emitted(56, 31) Source(2, 5) + SourceIndex(4) +1->Emitted(51, 5) Source(2, 5) + SourceIndex(4) +2 >Emitted(51, 28) Source(2, 16) + SourceIndex(4) +3 >Emitted(51, 31) Source(2, 5) + SourceIndex(4) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -1291,14 +1246,14 @@ sourceFile:../../../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(57, 9) Source(3, 9) + SourceIndex(4) -2 >Emitted(57, 16) Source(3, 16) + SourceIndex(4) -3 >Emitted(57, 17) Source(3, 17) + SourceIndex(4) -4 >Emitted(57, 20) Source(3, 20) + SourceIndex(4) -5 >Emitted(57, 21) Source(3, 21) + SourceIndex(4) -6 >Emitted(57, 41) Source(3, 41) + SourceIndex(4) -7 >Emitted(57, 42) Source(3, 42) + SourceIndex(4) -8 >Emitted(57, 43) Source(3, 43) + SourceIndex(4) +1->Emitted(52, 9) Source(3, 9) + SourceIndex(4) +2 >Emitted(52, 16) Source(3, 16) + SourceIndex(4) +3 >Emitted(52, 17) Source(3, 17) + SourceIndex(4) +4 >Emitted(52, 20) Source(3, 20) + SourceIndex(4) +5 >Emitted(52, 21) Source(3, 21) + SourceIndex(4) +6 >Emitted(52, 41) Source(3, 41) + SourceIndex(4) +7 >Emitted(52, 42) Source(3, 42) + SourceIndex(4) +8 >Emitted(52, 43) Source(3, 43) + SourceIndex(4) --- >>> }; 1 >^^^^ @@ -1307,8 +1262,8 @@ sourceFile:../../../second/second_part2.ts 1 > > 2 > } -1 >Emitted(58, 5) Source(4, 5) + SourceIndex(4) -2 >Emitted(58, 6) Source(4, 6) + SourceIndex(4) +1 >Emitted(53, 5) Source(4, 5) + SourceIndex(4) +2 >Emitted(53, 6) Source(4, 6) + SourceIndex(4) --- >>> return C; 1->^^^^ @@ -1316,8 +1271,8 @@ sourceFile:../../../second/second_part2.ts 1-> > 2 > } -1->Emitted(59, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(59, 13) Source(5, 2) + SourceIndex(4) +1->Emitted(54, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(54, 13) Source(5, 2) + SourceIndex(4) --- >>>}()); 1 > @@ -1333,10 +1288,10 @@ sourceFile:../../../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(60, 1) Source(5, 1) + SourceIndex(4) -2 >Emitted(60, 2) Source(5, 2) + SourceIndex(4) -3 >Emitted(60, 2) Source(1, 1) + SourceIndex(4) -4 >Emitted(60, 6) Source(5, 2) + SourceIndex(4) +1 >Emitted(55, 1) Source(5, 1) + SourceIndex(4) +2 >Emitted(55, 2) Source(5, 2) + SourceIndex(4) +3 >Emitted(55, 2) Source(1, 1) + SourceIndex(4) +4 >Emitted(55, 6) Source(5, 2) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1360,14 +1315,14 @@ sourceFile:../../third_part1.ts 6 > C 7 > () 8 > ; -1->Emitted(61, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(61, 5) Source(1, 5) + SourceIndex(5) -3 >Emitted(61, 6) Source(1, 6) + SourceIndex(5) -4 >Emitted(61, 9) Source(1, 9) + SourceIndex(5) -5 >Emitted(61, 13) Source(1, 13) + SourceIndex(5) -6 >Emitted(61, 14) Source(1, 14) + SourceIndex(5) -7 >Emitted(61, 16) Source(1, 16) + SourceIndex(5) -8 >Emitted(61, 17) Source(1, 17) + SourceIndex(5) +1->Emitted(56, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(56, 5) Source(1, 5) + SourceIndex(5) +3 >Emitted(56, 6) Source(1, 6) + SourceIndex(5) +4 >Emitted(56, 9) Source(1, 9) + SourceIndex(5) +5 >Emitted(56, 13) Source(1, 13) + SourceIndex(5) +6 >Emitted(56, 14) Source(1, 14) + SourceIndex(5) +7 >Emitted(56, 16) Source(1, 16) + SourceIndex(5) +8 >Emitted(56, 17) Source(1, 17) + SourceIndex(5) --- >>>c.doSomething(); 1-> @@ -1384,12 +1339,12 @@ sourceFile:../../third_part1.ts 4 > doSomething 5 > () 6 > ; -1->Emitted(62, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(62, 2) Source(2, 2) + SourceIndex(5) -3 >Emitted(62, 3) Source(2, 3) + SourceIndex(5) -4 >Emitted(62, 14) Source(2, 14) + SourceIndex(5) -5 >Emitted(62, 16) Source(2, 16) + SourceIndex(5) -6 >Emitted(62, 17) Source(2, 17) + SourceIndex(5) +1->Emitted(57, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(57, 2) Source(2, 2) + SourceIndex(5) +3 >Emitted(57, 3) Source(2, 3) + SourceIndex(5) +4 >Emitted(57, 14) Source(2, 14) + SourceIndex(5) +5 >Emitted(57, 16) Source(2, 16) + SourceIndex(5) +6 >Emitted(57, 17) Source(2, 17) + SourceIndex(5) --- >>>function forthirdthird_part1Rest() { 1-> @@ -1400,9 +1355,9 @@ sourceFile:../../third_part1.ts > 2 >function 3 > forthirdthird_part1Rest -1->Emitted(63, 1) Source(3, 1) + SourceIndex(5) -2 >Emitted(63, 10) Source(3, 10) + SourceIndex(5) -3 >Emitted(63, 33) Source(3, 33) + SourceIndex(5) +1->Emitted(58, 1) Source(3, 1) + SourceIndex(5) +2 >Emitted(58, 10) Source(3, 10) + SourceIndex(5) +3 >Emitted(58, 33) Source(3, 33) + SourceIndex(5) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -1456,31 +1411,31 @@ sourceFile:../../third_part1.ts 23> { b, ...rest } 24> = { a: 10, b: 30, yy: 30 } 25> ; -1->Emitted(64, 5) Source(4, 1) + SourceIndex(5) -2 >Emitted(64, 9) Source(4, 7) + SourceIndex(5) -3 >Emitted(64, 14) Source(4, 24) + SourceIndex(5) -4 >Emitted(64, 16) Source(4, 26) + SourceIndex(5) -5 >Emitted(64, 17) Source(4, 27) + SourceIndex(5) -6 >Emitted(64, 19) Source(4, 29) + SourceIndex(5) -7 >Emitted(64, 21) Source(4, 31) + SourceIndex(5) -8 >Emitted(64, 23) Source(4, 33) + SourceIndex(5) -9 >Emitted(64, 24) Source(4, 34) + SourceIndex(5) -10>Emitted(64, 26) Source(4, 36) + SourceIndex(5) -11>Emitted(64, 28) Source(4, 38) + SourceIndex(5) -12>Emitted(64, 30) Source(4, 40) + SourceIndex(5) -13>Emitted(64, 32) Source(4, 42) + SourceIndex(5) -14>Emitted(64, 34) Source(4, 44) + SourceIndex(5) -15>Emitted(64, 36) Source(4, 46) + SourceIndex(5) -16>Emitted(64, 38) Source(4, 48) + SourceIndex(5) -17>Emitted(64, 40) Source(4, 9) + SourceIndex(5) -18>Emitted(64, 41) Source(4, 10) + SourceIndex(5) -19>Emitted(64, 48) Source(4, 10) + SourceIndex(5) -20>Emitted(64, 50) Source(4, 15) + SourceIndex(5) -21>Emitted(64, 54) Source(4, 19) + SourceIndex(5) -22>Emitted(64, 68) Source(4, 7) + SourceIndex(5) -23>Emitted(64, 73) Source(4, 21) + SourceIndex(5) -24>Emitted(64, 74) Source(4, 48) + SourceIndex(5) -25>Emitted(64, 75) Source(4, 49) + SourceIndex(5) +1->Emitted(59, 5) Source(4, 1) + SourceIndex(5) +2 >Emitted(59, 9) Source(4, 7) + SourceIndex(5) +3 >Emitted(59, 14) Source(4, 24) + SourceIndex(5) +4 >Emitted(59, 16) Source(4, 26) + SourceIndex(5) +5 >Emitted(59, 17) Source(4, 27) + SourceIndex(5) +6 >Emitted(59, 19) Source(4, 29) + SourceIndex(5) +7 >Emitted(59, 21) Source(4, 31) + SourceIndex(5) +8 >Emitted(59, 23) Source(4, 33) + SourceIndex(5) +9 >Emitted(59, 24) Source(4, 34) + SourceIndex(5) +10>Emitted(59, 26) Source(4, 36) + SourceIndex(5) +11>Emitted(59, 28) Source(4, 38) + SourceIndex(5) +12>Emitted(59, 30) Source(4, 40) + SourceIndex(5) +13>Emitted(59, 32) Source(4, 42) + SourceIndex(5) +14>Emitted(59, 34) Source(4, 44) + SourceIndex(5) +15>Emitted(59, 36) Source(4, 46) + SourceIndex(5) +16>Emitted(59, 38) Source(4, 48) + SourceIndex(5) +17>Emitted(59, 40) Source(4, 9) + SourceIndex(5) +18>Emitted(59, 41) Source(4, 10) + SourceIndex(5) +19>Emitted(59, 48) Source(4, 10) + SourceIndex(5) +20>Emitted(59, 50) Source(4, 15) + SourceIndex(5) +21>Emitted(59, 54) Source(4, 19) + SourceIndex(5) +22>Emitted(59, 68) Source(4, 7) + SourceIndex(5) +23>Emitted(59, 73) Source(4, 21) + SourceIndex(5) +24>Emitted(59, 74) Source(4, 48) + SourceIndex(5) +25>Emitted(59, 75) Source(4, 49) + SourceIndex(5) --- >>>} 1 > @@ -1489,8 +1444,8 @@ sourceFile:../../third_part1.ts 1 > > 2 >} -1 >Emitted(65, 1) Source(5, 1) + SourceIndex(5) -2 >Emitted(65, 2) Source(5, 2) + SourceIndex(5) +1 >Emitted(60, 1) Source(5, 1) + SourceIndex(5) +2 >Emitted(60, 2) Source(5, 2) + SourceIndex(5) --- >>>//# sourceMappingURL=third-output.js.map @@ -1536,20 +1491,20 @@ sourceFile:../../third_part1.ts }, { "pos": 1330, - "end": 1831, + "end": 1721, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 1330, - "end": 1831, + "end": 1721, "kind": "text" } ] }, { - "pos": 1831, - "end": 1984, + "pos": 1721, + "end": 1874, "kind": "text" } ], @@ -1651,9 +1606,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (1330-1831):: ../../../2/second-output.js texts:: 1 +prepend: (1330-1721):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1330-1831) +text: (1330-1721) var N; (function (N) { function f() { @@ -1661,12 +1616,7 @@ var N; } f(); })(N || (N = {})); -function secondsecond_part1Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function secondsecond_part1Spread() { } secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30])); var C = (function () { function C() { @@ -1678,7 +1628,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (1831-1984) +text: (1721-1874) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/multiple-emitHelpers-in-all-projects.js index c79711d5c6a15..8e90960d51237 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/multiple-emitHelpers-in-all-projects.js @@ -376,17 +376,12 @@ var C = (function () { }; return C; }()); -function secondsecond_part2Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function secondsecond_part2Spread() { } secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); //# sourceMappingURL=second-output.js.map //// [/src/2/second-output.js.map] -{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;AAED,SAAS,wBAAwB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} +{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;AAED,SAAS,wBAAwB,KAAmB,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} //// [/src/2/second-output.js.map.baseline.txt] =================================================================== @@ -758,7 +753,7 @@ sourceFile:../second/second_part2.ts 2 >^ 3 > 4 > ^^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 2 >} 3 > @@ -772,65 +767,25 @@ sourceFile:../second/second_part2.ts 3 >Emitted(49, 2) Source(1, 1) + SourceIndex(1) 4 >Emitted(49, 6) Source(5, 2) + SourceIndex(1) --- ->>>function secondsecond_part2Spread() { +>>>function secondsecond_part2Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > 2 >function 3 > secondsecond_part2Spread +4 > (...b: number[]) { +5 > } 1->Emitted(50, 1) Source(7, 1) + SourceIndex(1) 2 >Emitted(50, 10) Source(7, 10) + SourceIndex(1) 3 >Emitted(50, 34) Source(7, 34) + SourceIndex(1) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(51, 5) Source(7, 35) + SourceIndex(1) -2 >Emitted(51, 16) Source(7, 49) + SourceIndex(1) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(52, 10) Source(7, 35) + SourceIndex(1) -2 >Emitted(52, 20) Source(7, 49) + SourceIndex(1) -3 >Emitted(52, 22) Source(7, 35) + SourceIndex(1) -4 >Emitted(52, 43) Source(7, 49) + SourceIndex(1) -5 >Emitted(52, 45) Source(7, 35) + SourceIndex(1) -6 >Emitted(52, 49) Source(7, 49) + SourceIndex(1) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(53, 9) Source(7, 35) + SourceIndex(1) -2 >Emitted(53, 31) Source(7, 49) + SourceIndex(1) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(55, 1) Source(7, 53) + SourceIndex(1) -2 >Emitted(55, 2) Source(7, 54) + SourceIndex(1) +4 >Emitted(50, 39) Source(7, 53) + SourceIndex(1) +5 >Emitted(50, 40) Source(7, 54) + SourceIndex(1) --- >>>secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -856,17 +811,17 @@ sourceFile:../second/second_part2.ts 9 > 30 10> ] 11> ); -1->Emitted(56, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(56, 25) Source(8, 25) + SourceIndex(1) -3 >Emitted(56, 49) Source(8, 29) + SourceIndex(1) -4 >Emitted(56, 50) Source(8, 30) + SourceIndex(1) -5 >Emitted(56, 52) Source(8, 32) + SourceIndex(1) -6 >Emitted(56, 54) Source(8, 34) + SourceIndex(1) -7 >Emitted(56, 56) Source(8, 36) + SourceIndex(1) -8 >Emitted(56, 58) Source(8, 38) + SourceIndex(1) -9 >Emitted(56, 60) Source(8, 40) + SourceIndex(1) -10>Emitted(56, 61) Source(8, 41) + SourceIndex(1) -11>Emitted(56, 64) Source(8, 43) + SourceIndex(1) +1->Emitted(51, 1) Source(8, 1) + SourceIndex(1) +2 >Emitted(51, 25) Source(8, 25) + SourceIndex(1) +3 >Emitted(51, 49) Source(8, 29) + SourceIndex(1) +4 >Emitted(51, 50) Source(8, 30) + SourceIndex(1) +5 >Emitted(51, 52) Source(8, 32) + SourceIndex(1) +6 >Emitted(51, 54) Source(8, 34) + SourceIndex(1) +7 >Emitted(51, 56) Source(8, 36) + SourceIndex(1) +8 >Emitted(51, 58) Source(8, 38) + SourceIndex(1) +9 >Emitted(51, 60) Source(8, 40) + SourceIndex(1) +10>Emitted(51, 61) Source(8, 41) + SourceIndex(1) +11>Emitted(51, 64) Source(8, 43) + SourceIndex(1) --- >>>//# sourceMappingURL=second-output.js.map @@ -900,7 +855,7 @@ sourceFile:../second/second_part2.ts }, { "pos": 1180, - "end": 1800, + "end": 1690, "kind": "text" } ], @@ -966,7 +921,7 @@ var __spread = (this && this.__spread) || function () { return ar; }; ---------------------------------------------------------------------- -text: (1180-1800) +text: (1180-1690) var N; (function (N) { function f() { @@ -985,12 +940,7 @@ var C = (function () { }; return C; }()); -function secondsecond_part2Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function secondsecond_part2Spread() { } secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); ====================================================================== @@ -1246,17 +1196,12 @@ console.log(f()); function f() { return "JS does hoists"; } -function firstfirst_part3Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function firstfirst_part3Spread() { } firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); //# sourceMappingURL=first-output.js.map //// [/src/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AACD,SAAS,sBAAsB,KAAmB,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} //// [/src/first/bin/first-output.js.map.baseline.txt] =================================================================== @@ -1525,71 +1470,31 @@ sourceFile:../first_part3.ts >>>} 1 > 2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > 2 >} 1 >Emitted(40, 1) Source(3, 1) + SourceIndex(2) 2 >Emitted(40, 2) Source(3, 2) + SourceIndex(2) --- ->>>function firstfirst_part3Spread() { +>>>function firstfirst_part3Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >function 3 > firstfirst_part3Spread +4 > (...b: number[]) { +5 > } 1->Emitted(41, 1) Source(4, 1) + SourceIndex(2) 2 >Emitted(41, 10) Source(4, 10) + SourceIndex(2) 3 >Emitted(41, 32) Source(4, 32) + SourceIndex(2) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(42, 5) Source(4, 33) + SourceIndex(2) -2 >Emitted(42, 16) Source(4, 47) + SourceIndex(2) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(43, 10) Source(4, 33) + SourceIndex(2) -2 >Emitted(43, 20) Source(4, 47) + SourceIndex(2) -3 >Emitted(43, 22) Source(4, 33) + SourceIndex(2) -4 >Emitted(43, 43) Source(4, 47) + SourceIndex(2) -5 >Emitted(43, 45) Source(4, 33) + SourceIndex(2) -6 >Emitted(43, 49) Source(4, 47) + SourceIndex(2) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(44, 9) Source(4, 33) + SourceIndex(2) -2 >Emitted(44, 31) Source(4, 47) + SourceIndex(2) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(46, 1) Source(4, 51) + SourceIndex(2) -2 >Emitted(46, 2) Source(4, 52) + SourceIndex(2) +4 >Emitted(41, 37) Source(4, 51) + SourceIndex(2) +5 >Emitted(41, 38) Source(4, 52) + SourceIndex(2) --- >>>firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -1615,17 +1520,17 @@ sourceFile:../first_part3.ts 9 > 30 10> ] 11> ); -1->Emitted(47, 1) Source(5, 1) + SourceIndex(2) -2 >Emitted(47, 23) Source(5, 23) + SourceIndex(2) -3 >Emitted(47, 47) Source(5, 27) + SourceIndex(2) -4 >Emitted(47, 48) Source(5, 28) + SourceIndex(2) -5 >Emitted(47, 50) Source(5, 30) + SourceIndex(2) -6 >Emitted(47, 52) Source(5, 32) + SourceIndex(2) -7 >Emitted(47, 54) Source(5, 34) + SourceIndex(2) -8 >Emitted(47, 56) Source(5, 36) + SourceIndex(2) -9 >Emitted(47, 58) Source(5, 38) + SourceIndex(2) -10>Emitted(47, 59) Source(5, 39) + SourceIndex(2) -11>Emitted(47, 62) Source(5, 41) + SourceIndex(2) +1->Emitted(42, 1) Source(5, 1) + SourceIndex(2) +2 >Emitted(42, 23) Source(5, 23) + SourceIndex(2) +3 >Emitted(42, 47) Source(5, 27) + SourceIndex(2) +4 >Emitted(42, 48) Source(5, 28) + SourceIndex(2) +5 >Emitted(42, 50) Source(5, 30) + SourceIndex(2) +6 >Emitted(42, 52) Source(5, 32) + SourceIndex(2) +7 >Emitted(42, 54) Source(5, 34) + SourceIndex(2) +8 >Emitted(42, 56) Source(5, 36) + SourceIndex(2) +9 >Emitted(42, 58) Source(5, 38) + SourceIndex(2) +10>Emitted(42, 59) Source(5, 39) + SourceIndex(2) +11>Emitted(42, 62) Source(5, 41) + SourceIndex(2) --- >>>//# sourceMappingURL=first-output.js.map @@ -1660,7 +1565,7 @@ sourceFile:../first_part3.ts }, { "pos": 1180, - "end": 1619, + "end": 1509, "kind": "text" } ], @@ -1726,7 +1631,7 @@ var __spread = (this && this.__spread) || function () { return ar; }; ---------------------------------------------------------------------- -text: (1180-1619) +text: (1180-1509) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -1736,12 +1641,7 @@ console.log(f()); function f() { return "JS does hoists"; } -function firstfirst_part3Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function firstfirst_part3Spread() { } firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); ====================================================================== @@ -2220,12 +2120,7 @@ console.log(f()); function f() { return "JS does hoists"; } -function firstfirst_part3Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function firstfirst_part3Spread() { } firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); var N; (function (N) { @@ -2245,29 +2140,19 @@ var C = (function () { }; return C; }()); -function secondsecond_part2Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function secondsecond_part2Spread() { } secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); } -function thirdthird_part1Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function thirdthird_part1Spread() { } thirdthird_part1Spread.apply(void 0, __spread([10, 20, 30])); //# sourceMappingURL=third-output.js.map //// [/src/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACAxC,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;AAED,SAAS,wBAAwB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACP1C,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AACD,SAAS,sBAAsB,KAAmB,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACAxC,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;AAED,SAAS,wBAAwB,KAAmB,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACP1C,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;AACD,SAAS,sBAAsB,KAAmB,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} //// [/src/third/thirdjs/output/third-output.js.map.baseline.txt] =================================================================== @@ -2536,71 +2421,31 @@ sourceFile:../../../first/first_part3.ts >>>} 1 > 2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > 2 >} 1 >Emitted(40, 1) Source(3, 1) + SourceIndex(2) 2 >Emitted(40, 2) Source(3, 2) + SourceIndex(2) --- ->>>function firstfirst_part3Spread() { +>>>function firstfirst_part3Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >function 3 > firstfirst_part3Spread +4 > (...b: number[]) { +5 > } 1->Emitted(41, 1) Source(4, 1) + SourceIndex(2) 2 >Emitted(41, 10) Source(4, 10) + SourceIndex(2) 3 >Emitted(41, 32) Source(4, 32) + SourceIndex(2) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(42, 5) Source(4, 33) + SourceIndex(2) -2 >Emitted(42, 16) Source(4, 47) + SourceIndex(2) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(43, 10) Source(4, 33) + SourceIndex(2) -2 >Emitted(43, 20) Source(4, 47) + SourceIndex(2) -3 >Emitted(43, 22) Source(4, 33) + SourceIndex(2) -4 >Emitted(43, 43) Source(4, 47) + SourceIndex(2) -5 >Emitted(43, 45) Source(4, 33) + SourceIndex(2) -6 >Emitted(43, 49) Source(4, 47) + SourceIndex(2) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(44, 9) Source(4, 33) + SourceIndex(2) -2 >Emitted(44, 31) Source(4, 47) + SourceIndex(2) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(46, 1) Source(4, 51) + SourceIndex(2) -2 >Emitted(46, 2) Source(4, 52) + SourceIndex(2) +4 >Emitted(41, 37) Source(4, 51) + SourceIndex(2) +5 >Emitted(41, 38) Source(4, 52) + SourceIndex(2) --- >>>firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -2626,17 +2471,17 @@ sourceFile:../../../first/first_part3.ts 9 > 30 10> ] 11> ); -1->Emitted(47, 1) Source(5, 1) + SourceIndex(2) -2 >Emitted(47, 23) Source(5, 23) + SourceIndex(2) -3 >Emitted(47, 47) Source(5, 27) + SourceIndex(2) -4 >Emitted(47, 48) Source(5, 28) + SourceIndex(2) -5 >Emitted(47, 50) Source(5, 30) + SourceIndex(2) -6 >Emitted(47, 52) Source(5, 32) + SourceIndex(2) -7 >Emitted(47, 54) Source(5, 34) + SourceIndex(2) -8 >Emitted(47, 56) Source(5, 36) + SourceIndex(2) -9 >Emitted(47, 58) Source(5, 38) + SourceIndex(2) -10>Emitted(47, 59) Source(5, 39) + SourceIndex(2) -11>Emitted(47, 62) Source(5, 41) + SourceIndex(2) +1->Emitted(42, 1) Source(5, 1) + SourceIndex(2) +2 >Emitted(42, 23) Source(5, 23) + SourceIndex(2) +3 >Emitted(42, 47) Source(5, 27) + SourceIndex(2) +4 >Emitted(42, 48) Source(5, 28) + SourceIndex(2) +5 >Emitted(42, 50) Source(5, 30) + SourceIndex(2) +6 >Emitted(42, 52) Source(5, 32) + SourceIndex(2) +7 >Emitted(42, 54) Source(5, 34) + SourceIndex(2) +8 >Emitted(42, 56) Source(5, 36) + SourceIndex(2) +9 >Emitted(42, 58) Source(5, 38) + SourceIndex(2) +10>Emitted(42, 59) Source(5, 39) + SourceIndex(2) +11>Emitted(42, 62) Source(5, 41) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -2662,10 +2507,10 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1 >Emitted(48, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(48, 5) Source(5, 11) + SourceIndex(3) -3 >Emitted(48, 6) Source(5, 12) + SourceIndex(3) -4 >Emitted(48, 7) Source(11, 2) + SourceIndex(3) +1 >Emitted(43, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(43, 5) Source(5, 11) + SourceIndex(3) +3 >Emitted(43, 6) Source(5, 12) + SourceIndex(3) +4 >Emitted(43, 7) Source(11, 2) + SourceIndex(3) --- >>>(function (N) { 1-> @@ -2675,9 +2520,9 @@ sourceFile:../../../second/second_part1.ts 1-> 2 >namespace 3 > N -1->Emitted(49, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(49, 12) Source(5, 11) + SourceIndex(3) -3 >Emitted(49, 13) Source(5, 12) + SourceIndex(3) +1->Emitted(44, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(44, 12) Source(5, 11) + SourceIndex(3) +3 >Emitted(44, 13) Source(5, 12) + SourceIndex(3) --- >>> function f() { 1->^^^^ @@ -2688,9 +2533,9 @@ sourceFile:../../../second/second_part1.ts > 2 > function 3 > f -1->Emitted(50, 5) Source(6, 5) + SourceIndex(3) -2 >Emitted(50, 14) Source(6, 14) + SourceIndex(3) -3 >Emitted(50, 15) Source(6, 15) + SourceIndex(3) +1->Emitted(45, 5) Source(6, 5) + SourceIndex(3) +2 >Emitted(45, 14) Source(6, 14) + SourceIndex(3) +3 >Emitted(45, 15) Source(6, 15) + SourceIndex(3) --- >>> console.log('testing'); 1->^^^^^^^^ @@ -2710,14 +2555,14 @@ sourceFile:../../../second/second_part1.ts 6 > 'testing' 7 > ) 8 > ; -1->Emitted(51, 9) Source(7, 9) + SourceIndex(3) -2 >Emitted(51, 16) Source(7, 16) + SourceIndex(3) -3 >Emitted(51, 17) Source(7, 17) + SourceIndex(3) -4 >Emitted(51, 20) Source(7, 20) + SourceIndex(3) -5 >Emitted(51, 21) Source(7, 21) + SourceIndex(3) -6 >Emitted(51, 30) Source(7, 30) + SourceIndex(3) -7 >Emitted(51, 31) Source(7, 31) + SourceIndex(3) -8 >Emitted(51, 32) Source(7, 32) + SourceIndex(3) +1->Emitted(46, 9) Source(7, 9) + SourceIndex(3) +2 >Emitted(46, 16) Source(7, 16) + SourceIndex(3) +3 >Emitted(46, 17) Source(7, 17) + SourceIndex(3) +4 >Emitted(46, 20) Source(7, 20) + SourceIndex(3) +5 >Emitted(46, 21) Source(7, 21) + SourceIndex(3) +6 >Emitted(46, 30) Source(7, 30) + SourceIndex(3) +7 >Emitted(46, 31) Source(7, 31) + SourceIndex(3) +8 >Emitted(46, 32) Source(7, 32) + SourceIndex(3) --- >>> } 1 >^^^^ @@ -2726,8 +2571,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 > } -1 >Emitted(52, 5) Source(8, 5) + SourceIndex(3) -2 >Emitted(52, 6) Source(8, 6) + SourceIndex(3) +1 >Emitted(47, 5) Source(8, 5) + SourceIndex(3) +2 >Emitted(47, 6) Source(8, 6) + SourceIndex(3) --- >>> f(); 1->^^^^ @@ -2741,10 +2586,10 @@ sourceFile:../../../second/second_part1.ts 2 > f 3 > () 4 > ; -1->Emitted(53, 5) Source(10, 5) + SourceIndex(3) -2 >Emitted(53, 6) Source(10, 6) + SourceIndex(3) -3 >Emitted(53, 8) Source(10, 8) + SourceIndex(3) -4 >Emitted(53, 9) Source(10, 9) + SourceIndex(3) +1->Emitted(48, 5) Source(10, 5) + SourceIndex(3) +2 >Emitted(48, 6) Source(10, 6) + SourceIndex(3) +3 >Emitted(48, 8) Source(10, 8) + SourceIndex(3) +4 >Emitted(48, 9) Source(10, 9) + SourceIndex(3) --- >>>})(N || (N = {})); 1-> @@ -2769,13 +2614,13 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(54, 1) Source(11, 1) + SourceIndex(3) -2 >Emitted(54, 2) Source(11, 2) + SourceIndex(3) -3 >Emitted(54, 4) Source(5, 11) + SourceIndex(3) -4 >Emitted(54, 5) Source(5, 12) + SourceIndex(3) -5 >Emitted(54, 10) Source(5, 11) + SourceIndex(3) -6 >Emitted(54, 11) Source(5, 12) + SourceIndex(3) -7 >Emitted(54, 19) Source(11, 2) + SourceIndex(3) +1->Emitted(49, 1) Source(11, 1) + SourceIndex(3) +2 >Emitted(49, 2) Source(11, 2) + SourceIndex(3) +3 >Emitted(49, 4) Source(5, 11) + SourceIndex(3) +4 >Emitted(49, 5) Source(5, 12) + SourceIndex(3) +5 >Emitted(49, 10) Source(5, 11) + SourceIndex(3) +6 >Emitted(49, 11) Source(5, 12) + SourceIndex(3) +7 >Emitted(49, 19) Source(11, 2) + SourceIndex(3) --- >>>function forsecondsecond_part1Rest() { 1-> @@ -2786,9 +2631,9 @@ sourceFile:../../../second/second_part1.ts > 2 >function 3 > forsecondsecond_part1Rest -1->Emitted(55, 1) Source(12, 1) + SourceIndex(3) -2 >Emitted(55, 10) Source(12, 10) + SourceIndex(3) -3 >Emitted(55, 35) Source(12, 35) + SourceIndex(3) +1->Emitted(50, 1) Source(12, 1) + SourceIndex(3) +2 >Emitted(50, 10) Source(12, 10) + SourceIndex(3) +3 >Emitted(50, 35) Source(12, 35) + SourceIndex(3) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -2842,31 +2687,31 @@ sourceFile:../../../second/second_part1.ts 23> { b, ...rest } 24> = { a: 10, b: 30, yy: 30 } 25> ; -1->Emitted(56, 5) Source(13, 1) + SourceIndex(3) -2 >Emitted(56, 9) Source(13, 7) + SourceIndex(3) -3 >Emitted(56, 14) Source(13, 24) + SourceIndex(3) -4 >Emitted(56, 16) Source(13, 26) + SourceIndex(3) -5 >Emitted(56, 17) Source(13, 27) + SourceIndex(3) -6 >Emitted(56, 19) Source(13, 29) + SourceIndex(3) -7 >Emitted(56, 21) Source(13, 31) + SourceIndex(3) -8 >Emitted(56, 23) Source(13, 33) + SourceIndex(3) -9 >Emitted(56, 24) Source(13, 34) + SourceIndex(3) -10>Emitted(56, 26) Source(13, 36) + SourceIndex(3) -11>Emitted(56, 28) Source(13, 38) + SourceIndex(3) -12>Emitted(56, 30) Source(13, 40) + SourceIndex(3) -13>Emitted(56, 32) Source(13, 42) + SourceIndex(3) -14>Emitted(56, 34) Source(13, 44) + SourceIndex(3) -15>Emitted(56, 36) Source(13, 46) + SourceIndex(3) -16>Emitted(56, 38) Source(13, 48) + SourceIndex(3) -17>Emitted(56, 40) Source(13, 9) + SourceIndex(3) -18>Emitted(56, 41) Source(13, 10) + SourceIndex(3) -19>Emitted(56, 48) Source(13, 10) + SourceIndex(3) -20>Emitted(56, 50) Source(13, 15) + SourceIndex(3) -21>Emitted(56, 54) Source(13, 19) + SourceIndex(3) -22>Emitted(56, 68) Source(13, 7) + SourceIndex(3) -23>Emitted(56, 73) Source(13, 21) + SourceIndex(3) -24>Emitted(56, 74) Source(13, 48) + SourceIndex(3) -25>Emitted(56, 75) Source(13, 49) + SourceIndex(3) +1->Emitted(51, 5) Source(13, 1) + SourceIndex(3) +2 >Emitted(51, 9) Source(13, 7) + SourceIndex(3) +3 >Emitted(51, 14) Source(13, 24) + SourceIndex(3) +4 >Emitted(51, 16) Source(13, 26) + SourceIndex(3) +5 >Emitted(51, 17) Source(13, 27) + SourceIndex(3) +6 >Emitted(51, 19) Source(13, 29) + SourceIndex(3) +7 >Emitted(51, 21) Source(13, 31) + SourceIndex(3) +8 >Emitted(51, 23) Source(13, 33) + SourceIndex(3) +9 >Emitted(51, 24) Source(13, 34) + SourceIndex(3) +10>Emitted(51, 26) Source(13, 36) + SourceIndex(3) +11>Emitted(51, 28) Source(13, 38) + SourceIndex(3) +12>Emitted(51, 30) Source(13, 40) + SourceIndex(3) +13>Emitted(51, 32) Source(13, 42) + SourceIndex(3) +14>Emitted(51, 34) Source(13, 44) + SourceIndex(3) +15>Emitted(51, 36) Source(13, 46) + SourceIndex(3) +16>Emitted(51, 38) Source(13, 48) + SourceIndex(3) +17>Emitted(51, 40) Source(13, 9) + SourceIndex(3) +18>Emitted(51, 41) Source(13, 10) + SourceIndex(3) +19>Emitted(51, 48) Source(13, 10) + SourceIndex(3) +20>Emitted(51, 50) Source(13, 15) + SourceIndex(3) +21>Emitted(51, 54) Source(13, 19) + SourceIndex(3) +22>Emitted(51, 68) Source(13, 7) + SourceIndex(3) +23>Emitted(51, 73) Source(13, 21) + SourceIndex(3) +24>Emitted(51, 74) Source(13, 48) + SourceIndex(3) +25>Emitted(51, 75) Source(13, 49) + SourceIndex(3) --- >>>} 1 > @@ -2875,8 +2720,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 >} -1 >Emitted(57, 1) Source(14, 1) + SourceIndex(3) -2 >Emitted(57, 2) Source(14, 2) + SourceIndex(3) +1 >Emitted(52, 1) Source(14, 1) + SourceIndex(3) +2 >Emitted(52, 2) Source(14, 2) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -2886,13 +2731,13 @@ sourceFile:../../../second/second_part2.ts 1-> 2 >^^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(58, 1) Source(1, 1) + SourceIndex(4) +1->Emitted(53, 1) Source(1, 1) + SourceIndex(4) --- >>> function C() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(59, 5) Source(1, 1) + SourceIndex(4) +1->Emitted(54, 5) Source(1, 1) + SourceIndex(4) --- >>> } 1->^^^^ @@ -2904,8 +2749,8 @@ sourceFile:../../../second/second_part2.ts > } > 2 > } -1->Emitted(60, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(60, 6) Source(5, 2) + SourceIndex(4) +1->Emitted(55, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(55, 6) Source(5, 2) + SourceIndex(4) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -2915,9 +2760,9 @@ sourceFile:../../../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(61, 5) Source(2, 5) + SourceIndex(4) -2 >Emitted(61, 28) Source(2, 16) + SourceIndex(4) -3 >Emitted(61, 31) Source(2, 5) + SourceIndex(4) +1->Emitted(56, 5) Source(2, 5) + SourceIndex(4) +2 >Emitted(56, 28) Source(2, 16) + SourceIndex(4) +3 >Emitted(56, 31) Source(2, 5) + SourceIndex(4) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -2937,14 +2782,14 @@ sourceFile:../../../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(62, 9) Source(3, 9) + SourceIndex(4) -2 >Emitted(62, 16) Source(3, 16) + SourceIndex(4) -3 >Emitted(62, 17) Source(3, 17) + SourceIndex(4) -4 >Emitted(62, 20) Source(3, 20) + SourceIndex(4) -5 >Emitted(62, 21) Source(3, 21) + SourceIndex(4) -6 >Emitted(62, 41) Source(3, 41) + SourceIndex(4) -7 >Emitted(62, 42) Source(3, 42) + SourceIndex(4) -8 >Emitted(62, 43) Source(3, 43) + SourceIndex(4) +1->Emitted(57, 9) Source(3, 9) + SourceIndex(4) +2 >Emitted(57, 16) Source(3, 16) + SourceIndex(4) +3 >Emitted(57, 17) Source(3, 17) + SourceIndex(4) +4 >Emitted(57, 20) Source(3, 20) + SourceIndex(4) +5 >Emitted(57, 21) Source(3, 21) + SourceIndex(4) +6 >Emitted(57, 41) Source(3, 41) + SourceIndex(4) +7 >Emitted(57, 42) Source(3, 42) + SourceIndex(4) +8 >Emitted(57, 43) Source(3, 43) + SourceIndex(4) --- >>> }; 1 >^^^^ @@ -2953,8 +2798,8 @@ sourceFile:../../../second/second_part2.ts 1 > > 2 > } -1 >Emitted(63, 5) Source(4, 5) + SourceIndex(4) -2 >Emitted(63, 6) Source(4, 6) + SourceIndex(4) +1 >Emitted(58, 5) Source(4, 5) + SourceIndex(4) +2 >Emitted(58, 6) Source(4, 6) + SourceIndex(4) --- >>> return C; 1->^^^^ @@ -2962,15 +2807,15 @@ sourceFile:../../../second/second_part2.ts 1-> > 2 > } -1->Emitted(64, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(64, 13) Source(5, 2) + SourceIndex(4) +1->Emitted(59, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(59, 13) Source(5, 2) + SourceIndex(4) --- >>>}()); 1 > 2 >^ 3 > 4 > ^^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 2 >} 3 > @@ -2979,70 +2824,30 @@ sourceFile:../../../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(65, 1) Source(5, 1) + SourceIndex(4) -2 >Emitted(65, 2) Source(5, 2) + SourceIndex(4) -3 >Emitted(65, 2) Source(1, 1) + SourceIndex(4) -4 >Emitted(65, 6) Source(5, 2) + SourceIndex(4) +1 >Emitted(60, 1) Source(5, 1) + SourceIndex(4) +2 >Emitted(60, 2) Source(5, 2) + SourceIndex(4) +3 >Emitted(60, 2) Source(1, 1) + SourceIndex(4) +4 >Emitted(60, 6) Source(5, 2) + SourceIndex(4) --- ->>>function secondsecond_part2Spread() { +>>>function secondsecond_part2Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > 2 >function 3 > secondsecond_part2Spread -1->Emitted(66, 1) Source(7, 1) + SourceIndex(4) -2 >Emitted(66, 10) Source(7, 10) + SourceIndex(4) -3 >Emitted(66, 34) Source(7, 34) + SourceIndex(4) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(67, 5) Source(7, 35) + SourceIndex(4) -2 >Emitted(67, 16) Source(7, 49) + SourceIndex(4) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(68, 10) Source(7, 35) + SourceIndex(4) -2 >Emitted(68, 20) Source(7, 49) + SourceIndex(4) -3 >Emitted(68, 22) Source(7, 35) + SourceIndex(4) -4 >Emitted(68, 43) Source(7, 49) + SourceIndex(4) -5 >Emitted(68, 45) Source(7, 35) + SourceIndex(4) -6 >Emitted(68, 49) Source(7, 49) + SourceIndex(4) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(69, 9) Source(7, 35) + SourceIndex(4) -2 >Emitted(69, 31) Source(7, 49) + SourceIndex(4) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(71, 1) Source(7, 53) + SourceIndex(4) -2 >Emitted(71, 2) Source(7, 54) + SourceIndex(4) +4 > (...b: number[]) { +5 > } +1->Emitted(61, 1) Source(7, 1) + SourceIndex(4) +2 >Emitted(61, 10) Source(7, 10) + SourceIndex(4) +3 >Emitted(61, 34) Source(7, 34) + SourceIndex(4) +4 >Emitted(61, 39) Source(7, 53) + SourceIndex(4) +5 >Emitted(61, 40) Source(7, 54) + SourceIndex(4) --- >>>secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -3068,17 +2873,17 @@ sourceFile:../../../second/second_part2.ts 9 > 30 10> ] 11> ); -1->Emitted(72, 1) Source(8, 1) + SourceIndex(4) -2 >Emitted(72, 25) Source(8, 25) + SourceIndex(4) -3 >Emitted(72, 49) Source(8, 29) + SourceIndex(4) -4 >Emitted(72, 50) Source(8, 30) + SourceIndex(4) -5 >Emitted(72, 52) Source(8, 32) + SourceIndex(4) -6 >Emitted(72, 54) Source(8, 34) + SourceIndex(4) -7 >Emitted(72, 56) Source(8, 36) + SourceIndex(4) -8 >Emitted(72, 58) Source(8, 38) + SourceIndex(4) -9 >Emitted(72, 60) Source(8, 40) + SourceIndex(4) -10>Emitted(72, 61) Source(8, 41) + SourceIndex(4) -11>Emitted(72, 64) Source(8, 43) + SourceIndex(4) +1->Emitted(62, 1) Source(8, 1) + SourceIndex(4) +2 >Emitted(62, 25) Source(8, 25) + SourceIndex(4) +3 >Emitted(62, 49) Source(8, 29) + SourceIndex(4) +4 >Emitted(62, 50) Source(8, 30) + SourceIndex(4) +5 >Emitted(62, 52) Source(8, 32) + SourceIndex(4) +6 >Emitted(62, 54) Source(8, 34) + SourceIndex(4) +7 >Emitted(62, 56) Source(8, 36) + SourceIndex(4) +8 >Emitted(62, 58) Source(8, 38) + SourceIndex(4) +9 >Emitted(62, 60) Source(8, 40) + SourceIndex(4) +10>Emitted(62, 61) Source(8, 41) + SourceIndex(4) +11>Emitted(62, 64) Source(8, 43) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -3102,14 +2907,14 @@ sourceFile:../../third_part1.ts 6 > C 7 > () 8 > ; -1 >Emitted(73, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(73, 5) Source(1, 5) + SourceIndex(5) -3 >Emitted(73, 6) Source(1, 6) + SourceIndex(5) -4 >Emitted(73, 9) Source(1, 9) + SourceIndex(5) -5 >Emitted(73, 13) Source(1, 13) + SourceIndex(5) -6 >Emitted(73, 14) Source(1, 14) + SourceIndex(5) -7 >Emitted(73, 16) Source(1, 16) + SourceIndex(5) -8 >Emitted(73, 17) Source(1, 17) + SourceIndex(5) +1 >Emitted(63, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(63, 5) Source(1, 5) + SourceIndex(5) +3 >Emitted(63, 6) Source(1, 6) + SourceIndex(5) +4 >Emitted(63, 9) Source(1, 9) + SourceIndex(5) +5 >Emitted(63, 13) Source(1, 13) + SourceIndex(5) +6 >Emitted(63, 14) Source(1, 14) + SourceIndex(5) +7 >Emitted(63, 16) Source(1, 16) + SourceIndex(5) +8 >Emitted(63, 17) Source(1, 17) + SourceIndex(5) --- >>>c.doSomething(); 1-> @@ -3126,12 +2931,12 @@ sourceFile:../../third_part1.ts 4 > doSomething 5 > () 6 > ; -1->Emitted(74, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(74, 2) Source(2, 2) + SourceIndex(5) -3 >Emitted(74, 3) Source(2, 3) + SourceIndex(5) -4 >Emitted(74, 14) Source(2, 14) + SourceIndex(5) -5 >Emitted(74, 16) Source(2, 16) + SourceIndex(5) -6 >Emitted(74, 17) Source(2, 17) + SourceIndex(5) +1->Emitted(64, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(64, 2) Source(2, 2) + SourceIndex(5) +3 >Emitted(64, 3) Source(2, 3) + SourceIndex(5) +4 >Emitted(64, 14) Source(2, 14) + SourceIndex(5) +5 >Emitted(64, 16) Source(2, 16) + SourceIndex(5) +6 >Emitted(64, 17) Source(2, 17) + SourceIndex(5) --- >>>function forthirdthird_part1Rest() { 1-> @@ -3142,9 +2947,9 @@ sourceFile:../../third_part1.ts > 2 >function 3 > forthirdthird_part1Rest -1->Emitted(75, 1) Source(3, 1) + SourceIndex(5) -2 >Emitted(75, 10) Source(3, 10) + SourceIndex(5) -3 >Emitted(75, 33) Source(3, 33) + SourceIndex(5) +1->Emitted(65, 1) Source(3, 1) + SourceIndex(5) +2 >Emitted(65, 10) Source(3, 10) + SourceIndex(5) +3 >Emitted(65, 33) Source(3, 33) + SourceIndex(5) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -3198,100 +3003,60 @@ sourceFile:../../third_part1.ts 23> { b, ...rest } 24> = { a: 10, b: 30, yy: 30 } 25> ; -1->Emitted(76, 5) Source(4, 1) + SourceIndex(5) -2 >Emitted(76, 9) Source(4, 7) + SourceIndex(5) -3 >Emitted(76, 14) Source(4, 24) + SourceIndex(5) -4 >Emitted(76, 16) Source(4, 26) + SourceIndex(5) -5 >Emitted(76, 17) Source(4, 27) + SourceIndex(5) -6 >Emitted(76, 19) Source(4, 29) + SourceIndex(5) -7 >Emitted(76, 21) Source(4, 31) + SourceIndex(5) -8 >Emitted(76, 23) Source(4, 33) + SourceIndex(5) -9 >Emitted(76, 24) Source(4, 34) + SourceIndex(5) -10>Emitted(76, 26) Source(4, 36) + SourceIndex(5) -11>Emitted(76, 28) Source(4, 38) + SourceIndex(5) -12>Emitted(76, 30) Source(4, 40) + SourceIndex(5) -13>Emitted(76, 32) Source(4, 42) + SourceIndex(5) -14>Emitted(76, 34) Source(4, 44) + SourceIndex(5) -15>Emitted(76, 36) Source(4, 46) + SourceIndex(5) -16>Emitted(76, 38) Source(4, 48) + SourceIndex(5) -17>Emitted(76, 40) Source(4, 9) + SourceIndex(5) -18>Emitted(76, 41) Source(4, 10) + SourceIndex(5) -19>Emitted(76, 48) Source(4, 10) + SourceIndex(5) -20>Emitted(76, 50) Source(4, 15) + SourceIndex(5) -21>Emitted(76, 54) Source(4, 19) + SourceIndex(5) -22>Emitted(76, 68) Source(4, 7) + SourceIndex(5) -23>Emitted(76, 73) Source(4, 21) + SourceIndex(5) -24>Emitted(76, 74) Source(4, 48) + SourceIndex(5) -25>Emitted(76, 75) Source(4, 49) + SourceIndex(5) +1->Emitted(66, 5) Source(4, 1) + SourceIndex(5) +2 >Emitted(66, 9) Source(4, 7) + SourceIndex(5) +3 >Emitted(66, 14) Source(4, 24) + SourceIndex(5) +4 >Emitted(66, 16) Source(4, 26) + SourceIndex(5) +5 >Emitted(66, 17) Source(4, 27) + SourceIndex(5) +6 >Emitted(66, 19) Source(4, 29) + SourceIndex(5) +7 >Emitted(66, 21) Source(4, 31) + SourceIndex(5) +8 >Emitted(66, 23) Source(4, 33) + SourceIndex(5) +9 >Emitted(66, 24) Source(4, 34) + SourceIndex(5) +10>Emitted(66, 26) Source(4, 36) + SourceIndex(5) +11>Emitted(66, 28) Source(4, 38) + SourceIndex(5) +12>Emitted(66, 30) Source(4, 40) + SourceIndex(5) +13>Emitted(66, 32) Source(4, 42) + SourceIndex(5) +14>Emitted(66, 34) Source(4, 44) + SourceIndex(5) +15>Emitted(66, 36) Source(4, 46) + SourceIndex(5) +16>Emitted(66, 38) Source(4, 48) + SourceIndex(5) +17>Emitted(66, 40) Source(4, 9) + SourceIndex(5) +18>Emitted(66, 41) Source(4, 10) + SourceIndex(5) +19>Emitted(66, 48) Source(4, 10) + SourceIndex(5) +20>Emitted(66, 50) Source(4, 15) + SourceIndex(5) +21>Emitted(66, 54) Source(4, 19) + SourceIndex(5) +22>Emitted(66, 68) Source(4, 7) + SourceIndex(5) +23>Emitted(66, 73) Source(4, 21) + SourceIndex(5) +24>Emitted(66, 74) Source(4, 48) + SourceIndex(5) +25>Emitted(66, 75) Source(4, 49) + SourceIndex(5) --- >>>} 1 > 2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > 2 >} -1 >Emitted(77, 1) Source(5, 1) + SourceIndex(5) -2 >Emitted(77, 2) Source(5, 2) + SourceIndex(5) +1 >Emitted(67, 1) Source(5, 1) + SourceIndex(5) +2 >Emitted(67, 2) Source(5, 2) + SourceIndex(5) --- ->>>function thirdthird_part1Spread() { +>>>function thirdthird_part1Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >function 3 > thirdthird_part1Spread -1->Emitted(78, 1) Source(6, 1) + SourceIndex(5) -2 >Emitted(78, 10) Source(6, 10) + SourceIndex(5) -3 >Emitted(78, 32) Source(6, 32) + SourceIndex(5) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(79, 5) Source(6, 33) + SourceIndex(5) -2 >Emitted(79, 16) Source(6, 47) + SourceIndex(5) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(80, 10) Source(6, 33) + SourceIndex(5) -2 >Emitted(80, 20) Source(6, 47) + SourceIndex(5) -3 >Emitted(80, 22) Source(6, 33) + SourceIndex(5) -4 >Emitted(80, 43) Source(6, 47) + SourceIndex(5) -5 >Emitted(80, 45) Source(6, 33) + SourceIndex(5) -6 >Emitted(80, 49) Source(6, 47) + SourceIndex(5) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(81, 9) Source(6, 33) + SourceIndex(5) -2 >Emitted(81, 31) Source(6, 47) + SourceIndex(5) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(83, 1) Source(6, 51) + SourceIndex(5) -2 >Emitted(83, 2) Source(6, 52) + SourceIndex(5) +4 > (...b: number[]) { +5 > } +1->Emitted(68, 1) Source(6, 1) + SourceIndex(5) +2 >Emitted(68, 10) Source(6, 10) + SourceIndex(5) +3 >Emitted(68, 32) Source(6, 32) + SourceIndex(5) +4 >Emitted(68, 37) Source(6, 51) + SourceIndex(5) +5 >Emitted(68, 38) Source(6, 52) + SourceIndex(5) --- >>>thirdthird_part1Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -3317,17 +3082,17 @@ sourceFile:../../third_part1.ts 9 > 30 10> ] 11> ); -1->Emitted(84, 1) Source(7, 1) + SourceIndex(5) -2 >Emitted(84, 23) Source(7, 23) + SourceIndex(5) -3 >Emitted(84, 47) Source(7, 27) + SourceIndex(5) -4 >Emitted(84, 48) Source(7, 28) + SourceIndex(5) -5 >Emitted(84, 50) Source(7, 30) + SourceIndex(5) -6 >Emitted(84, 52) Source(7, 32) + SourceIndex(5) -7 >Emitted(84, 54) Source(7, 34) + SourceIndex(5) -8 >Emitted(84, 56) Source(7, 36) + SourceIndex(5) -9 >Emitted(84, 58) Source(7, 38) + SourceIndex(5) -10>Emitted(84, 59) Source(7, 39) + SourceIndex(5) -11>Emitted(84, 62) Source(7, 41) + SourceIndex(5) +1->Emitted(69, 1) Source(7, 1) + SourceIndex(5) +2 >Emitted(69, 23) Source(7, 23) + SourceIndex(5) +3 >Emitted(69, 47) Source(7, 27) + SourceIndex(5) +4 >Emitted(69, 48) Source(7, 28) + SourceIndex(5) +5 >Emitted(69, 50) Source(7, 30) + SourceIndex(5) +6 >Emitted(69, 52) Source(7, 32) + SourceIndex(5) +7 >Emitted(69, 54) Source(7, 34) + SourceIndex(5) +8 >Emitted(69, 56) Source(7, 36) + SourceIndex(5) +9 >Emitted(69, 58) Source(7, 38) + SourceIndex(5) +10>Emitted(69, 59) Source(7, 39) + SourceIndex(5) +11>Emitted(69, 62) Source(7, 41) + SourceIndex(5) --- >>>//# sourceMappingURL=third-output.js.map @@ -3360,33 +3125,33 @@ sourceFile:../../third_part1.ts }, { "pos": 1180, - "end": 1619, + "end": 1509, "kind": "prepend", "data": "../../../first/bin/first-output.js", "texts": [ { "pos": 1180, - "end": 1619, + "end": 1509, "kind": "text" } ] }, { - "pos": 1619, - "end": 2239, + "pos": 1509, + "end": 2019, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { - "pos": 1619, - "end": 2239, + "pos": 1509, + "end": 2019, "kind": "text" } ] }, { - "pos": 2239, - "end": 2604, + "pos": 2019, + "end": 2274, "kind": "text" } ], @@ -3478,9 +3243,9 @@ var __spread = (this && this.__spread) || function () { return ar; }; ---------------------------------------------------------------------- -prepend: (1180-1619):: ../../../first/bin/first-output.js texts:: 1 +prepend: (1180-1509):: ../../../first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1180-1619) +text: (1180-1509) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -3490,18 +3255,13 @@ console.log(f()); function f() { return "JS does hoists"; } -function firstfirst_part3Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function firstfirst_part3Spread() { } firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); ---------------------------------------------------------------------- -prepend: (1619-2239):: ../../../2/second-output.js texts:: 1 +prepend: (1509-2019):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1619-2239) +text: (1509-2019) var N; (function (N) { function f() { @@ -3520,27 +3280,17 @@ var C = (function () { }; return C; }()); -function secondsecond_part2Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function secondsecond_part2Spread() { } secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); ---------------------------------------------------------------------- -text: (2239-2604) +text: (2019-2274) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); } -function thirdthird_part1Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function thirdthird_part1Spread() { } thirdthird_part1Spread.apply(void 0, __spread([10, 20, 30])); ====================================================================== diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/multiple-emitHelpers-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/multiple-emitHelpers-in-different-projects.js index a25738af1de97..d10cfeef19a37 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/multiple-emitHelpers-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/multiple-emitHelpers-in-different-projects.js @@ -328,12 +328,7 @@ var N; } f(); })(N || (N = {})); -function secondsecond_part1Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function secondsecond_part1Spread() { } secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30])); var C = (function () { function C() { @@ -346,7 +341,7 @@ var C = (function () { //# sourceMappingURL=second-output.js.map //// [/src/2/second-output.js.map] -{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AAED,SAAS,wBAAwB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACb1C;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} +{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AAED,SAAS,wBAAwB,KAAmB,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACb1C;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} //// [/src/2/second-output.js.map.baseline.txt] =================================================================== @@ -491,7 +486,7 @@ sourceFile:../second/second_part1.ts 5 > ^^^^^ 6 > ^ 7 > ^^^^^^^^ -8 > ^^^^^^^^^^^^^^^^^^^^-> +8 > ^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >} @@ -514,65 +509,25 @@ sourceFile:../second/second_part1.ts 6 >Emitted(27, 11) Source(5, 12) + SourceIndex(0) 7 >Emitted(27, 19) Source(11, 2) + SourceIndex(0) --- ->>>function secondsecond_part1Spread() { +>>>function secondsecond_part1Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > 2 >function 3 > secondsecond_part1Spread +4 > (...b: number[]) { +5 > } 1->Emitted(28, 1) Source(13, 1) + SourceIndex(0) 2 >Emitted(28, 10) Source(13, 10) + SourceIndex(0) 3 >Emitted(28, 34) Source(13, 34) + SourceIndex(0) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(29, 5) Source(13, 35) + SourceIndex(0) -2 >Emitted(29, 16) Source(13, 49) + SourceIndex(0) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(30, 10) Source(13, 35) + SourceIndex(0) -2 >Emitted(30, 20) Source(13, 49) + SourceIndex(0) -3 >Emitted(30, 22) Source(13, 35) + SourceIndex(0) -4 >Emitted(30, 43) Source(13, 49) + SourceIndex(0) -5 >Emitted(30, 45) Source(13, 35) + SourceIndex(0) -6 >Emitted(30, 49) Source(13, 49) + SourceIndex(0) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(31, 9) Source(13, 35) + SourceIndex(0) -2 >Emitted(31, 31) Source(13, 49) + SourceIndex(0) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(33, 1) Source(13, 53) + SourceIndex(0) -2 >Emitted(33, 2) Source(13, 54) + SourceIndex(0) +4 >Emitted(28, 39) Source(13, 53) + SourceIndex(0) +5 >Emitted(28, 40) Source(13, 54) + SourceIndex(0) --- >>>secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -598,17 +553,17 @@ sourceFile:../second/second_part1.ts 9 > 30 10> ] 11> ); -1->Emitted(34, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(34, 25) Source(14, 25) + SourceIndex(0) -3 >Emitted(34, 49) Source(14, 29) + SourceIndex(0) -4 >Emitted(34, 50) Source(14, 30) + SourceIndex(0) -5 >Emitted(34, 52) Source(14, 32) + SourceIndex(0) -6 >Emitted(34, 54) Source(14, 34) + SourceIndex(0) -7 >Emitted(34, 56) Source(14, 36) + SourceIndex(0) -8 >Emitted(34, 58) Source(14, 38) + SourceIndex(0) -9 >Emitted(34, 60) Source(14, 40) + SourceIndex(0) -10>Emitted(34, 61) Source(14, 41) + SourceIndex(0) -11>Emitted(34, 64) Source(14, 43) + SourceIndex(0) +1->Emitted(29, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(29, 25) Source(14, 25) + SourceIndex(0) +3 >Emitted(29, 49) Source(14, 29) + SourceIndex(0) +4 >Emitted(29, 50) Source(14, 30) + SourceIndex(0) +5 >Emitted(29, 52) Source(14, 32) + SourceIndex(0) +6 >Emitted(29, 54) Source(14, 34) + SourceIndex(0) +7 >Emitted(29, 56) Source(14, 36) + SourceIndex(0) +8 >Emitted(29, 58) Source(14, 38) + SourceIndex(0) +9 >Emitted(29, 60) Source(14, 40) + SourceIndex(0) +10>Emitted(29, 61) Source(14, 41) + SourceIndex(0) +11>Emitted(29, 64) Source(14, 43) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/2/second-output.js @@ -618,13 +573,13 @@ sourceFile:../second/second_part2.ts 1 > 2 >^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(35, 1) Source(1, 1) + SourceIndex(1) +1 >Emitted(30, 1) Source(1, 1) + SourceIndex(1) --- >>> function C() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(36, 5) Source(1, 1) + SourceIndex(1) +1->Emitted(31, 5) Source(1, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -636,8 +591,8 @@ sourceFile:../second/second_part2.ts > } > 2 > } -1->Emitted(37, 5) Source(5, 1) + SourceIndex(1) -2 >Emitted(37, 6) Source(5, 2) + SourceIndex(1) +1->Emitted(32, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(32, 6) Source(5, 2) + SourceIndex(1) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -647,9 +602,9 @@ sourceFile:../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(38, 5) Source(2, 5) + SourceIndex(1) -2 >Emitted(38, 28) Source(2, 16) + SourceIndex(1) -3 >Emitted(38, 31) Source(2, 5) + SourceIndex(1) +1->Emitted(33, 5) Source(2, 5) + SourceIndex(1) +2 >Emitted(33, 28) Source(2, 16) + SourceIndex(1) +3 >Emitted(33, 31) Source(2, 5) + SourceIndex(1) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -669,14 +624,14 @@ sourceFile:../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(39, 9) Source(3, 9) + SourceIndex(1) -2 >Emitted(39, 16) Source(3, 16) + SourceIndex(1) -3 >Emitted(39, 17) Source(3, 17) + SourceIndex(1) -4 >Emitted(39, 20) Source(3, 20) + SourceIndex(1) -5 >Emitted(39, 21) Source(3, 21) + SourceIndex(1) -6 >Emitted(39, 41) Source(3, 41) + SourceIndex(1) -7 >Emitted(39, 42) Source(3, 42) + SourceIndex(1) -8 >Emitted(39, 43) Source(3, 43) + SourceIndex(1) +1->Emitted(34, 9) Source(3, 9) + SourceIndex(1) +2 >Emitted(34, 16) Source(3, 16) + SourceIndex(1) +3 >Emitted(34, 17) Source(3, 17) + SourceIndex(1) +4 >Emitted(34, 20) Source(3, 20) + SourceIndex(1) +5 >Emitted(34, 21) Source(3, 21) + SourceIndex(1) +6 >Emitted(34, 41) Source(3, 41) + SourceIndex(1) +7 >Emitted(34, 42) Source(3, 42) + SourceIndex(1) +8 >Emitted(34, 43) Source(3, 43) + SourceIndex(1) --- >>> }; 1 >^^^^ @@ -685,8 +640,8 @@ sourceFile:../second/second_part2.ts 1 > > 2 > } -1 >Emitted(40, 5) Source(4, 5) + SourceIndex(1) -2 >Emitted(40, 6) Source(4, 6) + SourceIndex(1) +1 >Emitted(35, 5) Source(4, 5) + SourceIndex(1) +2 >Emitted(35, 6) Source(4, 6) + SourceIndex(1) --- >>> return C; 1->^^^^ @@ -694,8 +649,8 @@ sourceFile:../second/second_part2.ts 1-> > 2 > } -1->Emitted(41, 5) Source(5, 1) + SourceIndex(1) -2 >Emitted(41, 13) Source(5, 2) + SourceIndex(1) +1->Emitted(36, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(36, 13) Source(5, 2) + SourceIndex(1) --- >>>}()); 1 > @@ -711,10 +666,10 @@ sourceFile:../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(42, 1) Source(5, 1) + SourceIndex(1) -2 >Emitted(42, 2) Source(5, 2) + SourceIndex(1) -3 >Emitted(42, 2) Source(1, 1) + SourceIndex(1) -4 >Emitted(42, 6) Source(5, 2) + SourceIndex(1) +1 >Emitted(37, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(37, 2) Source(5, 2) + SourceIndex(1) +3 >Emitted(37, 2) Source(1, 1) + SourceIndex(1) +4 >Emitted(37, 6) Source(5, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=second-output.js.map @@ -742,7 +697,7 @@ sourceFile:../second/second_part2.ts }, { "pos": 678, - "end": 1179, + "end": 1069, "kind": "text" } ], @@ -794,7 +749,7 @@ var __spread = (this && this.__spread) || function () { return ar; }; ---------------------------------------------------------------------- -text: (678-1179) +text: (678-1069) var N; (function (N) { function f() { @@ -802,12 +757,7 @@ var N; } f(); })(N || (N = {})); -function secondsecond_part1Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function secondsecond_part1Spread() { } secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30])); var C = (function () { function C() { @@ -1750,12 +1700,7 @@ var N; } f(); })(N || (N = {})); -function secondsecond_part1Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function secondsecond_part1Spread() { } secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30])); var C = (function () { function C() { @@ -1773,7 +1718,7 @@ function forthirdthird_part1Rest() { //# sourceMappingURL=third-output.js.map //// [/src/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AAED,SAAS,wBAAwB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACb1C;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AAED,SAAS,wBAAwB,KAAmB,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACb1C;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,KAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAvC,CAAC,OAAA,EAAK,IAAI,cAAZ,KAAc,CAA2B,CAAC;AAChD,CAAC"} //// [/src/third/thirdjs/output/third-output.js.map.baseline.txt] =================================================================== @@ -2165,7 +2110,7 @@ sourceFile:../../../second/second_part1.ts 5 > ^^^^^ 6 > ^ 7 > ^^^^^^^^ -8 > ^^^^^^^^^^^^^^^^^^^^-> +8 > ^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >} @@ -2188,65 +2133,25 @@ sourceFile:../../../second/second_part1.ts 6 >Emitted(47, 11) Source(5, 12) + SourceIndex(3) 7 >Emitted(47, 19) Source(11, 2) + SourceIndex(3) --- ->>>function secondsecond_part1Spread() { +>>>function secondsecond_part1Spread() { } 1-> 2 >^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > 2 >function 3 > secondsecond_part1Spread +4 > (...b: number[]) { +5 > } 1->Emitted(48, 1) Source(13, 1) + SourceIndex(3) 2 >Emitted(48, 10) Source(13, 10) + SourceIndex(3) 3 >Emitted(48, 34) Source(13, 34) + SourceIndex(3) ---- ->>> var b = []; -1 >^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >( -2 > ...b: number[] -1 >Emitted(49, 5) Source(13, 35) + SourceIndex(3) -2 >Emitted(49, 16) Source(13, 49) + SourceIndex(3) ---- ->>> for (var _i = 0; _i < arguments.length; _i++) { -1->^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...b: number[] -3 > -4 > ...b: number[] -5 > -6 > ...b: number[] -1->Emitted(50, 10) Source(13, 35) + SourceIndex(3) -2 >Emitted(50, 20) Source(13, 49) + SourceIndex(3) -3 >Emitted(50, 22) Source(13, 35) + SourceIndex(3) -4 >Emitted(50, 43) Source(13, 49) + SourceIndex(3) -5 >Emitted(50, 45) Source(13, 35) + SourceIndex(3) -6 >Emitted(50, 49) Source(13, 49) + SourceIndex(3) ---- ->>> b[_i] = arguments[_i]; -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...b: number[] -1 >Emitted(51, 9) Source(13, 35) + SourceIndex(3) -2 >Emitted(51, 31) Source(13, 49) + SourceIndex(3) ---- ->>> } ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { -2 >} -1 >Emitted(53, 1) Source(13, 53) + SourceIndex(3) -2 >Emitted(53, 2) Source(13, 54) + SourceIndex(3) +4 >Emitted(48, 39) Source(13, 53) + SourceIndex(3) +5 >Emitted(48, 40) Source(13, 54) + SourceIndex(3) --- >>>secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -2272,17 +2177,17 @@ sourceFile:../../../second/second_part1.ts 9 > 30 10> ] 11> ); -1->Emitted(54, 1) Source(14, 1) + SourceIndex(3) -2 >Emitted(54, 25) Source(14, 25) + SourceIndex(3) -3 >Emitted(54, 49) Source(14, 29) + SourceIndex(3) -4 >Emitted(54, 50) Source(14, 30) + SourceIndex(3) -5 >Emitted(54, 52) Source(14, 32) + SourceIndex(3) -6 >Emitted(54, 54) Source(14, 34) + SourceIndex(3) -7 >Emitted(54, 56) Source(14, 36) + SourceIndex(3) -8 >Emitted(54, 58) Source(14, 38) + SourceIndex(3) -9 >Emitted(54, 60) Source(14, 40) + SourceIndex(3) -10>Emitted(54, 61) Source(14, 41) + SourceIndex(3) -11>Emitted(54, 64) Source(14, 43) + SourceIndex(3) +1->Emitted(49, 1) Source(14, 1) + SourceIndex(3) +2 >Emitted(49, 25) Source(14, 25) + SourceIndex(3) +3 >Emitted(49, 49) Source(14, 29) + SourceIndex(3) +4 >Emitted(49, 50) Source(14, 30) + SourceIndex(3) +5 >Emitted(49, 52) Source(14, 32) + SourceIndex(3) +6 >Emitted(49, 54) Source(14, 34) + SourceIndex(3) +7 >Emitted(49, 56) Source(14, 36) + SourceIndex(3) +8 >Emitted(49, 58) Source(14, 38) + SourceIndex(3) +9 >Emitted(49, 60) Source(14, 40) + SourceIndex(3) +10>Emitted(49, 61) Source(14, 41) + SourceIndex(3) +11>Emitted(49, 64) Source(14, 43) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -2292,13 +2197,13 @@ sourceFile:../../../second/second_part2.ts 1 > 2 >^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(55, 1) Source(1, 1) + SourceIndex(4) +1 >Emitted(50, 1) Source(1, 1) + SourceIndex(4) --- >>> function C() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(56, 5) Source(1, 1) + SourceIndex(4) +1->Emitted(51, 5) Source(1, 1) + SourceIndex(4) --- >>> } 1->^^^^ @@ -2310,8 +2215,8 @@ sourceFile:../../../second/second_part2.ts > } > 2 > } -1->Emitted(57, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(57, 6) Source(5, 2) + SourceIndex(4) +1->Emitted(52, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(52, 6) Source(5, 2) + SourceIndex(4) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -2321,9 +2226,9 @@ sourceFile:../../../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(58, 5) Source(2, 5) + SourceIndex(4) -2 >Emitted(58, 28) Source(2, 16) + SourceIndex(4) -3 >Emitted(58, 31) Source(2, 5) + SourceIndex(4) +1->Emitted(53, 5) Source(2, 5) + SourceIndex(4) +2 >Emitted(53, 28) Source(2, 16) + SourceIndex(4) +3 >Emitted(53, 31) Source(2, 5) + SourceIndex(4) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -2343,14 +2248,14 @@ sourceFile:../../../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(59, 9) Source(3, 9) + SourceIndex(4) -2 >Emitted(59, 16) Source(3, 16) + SourceIndex(4) -3 >Emitted(59, 17) Source(3, 17) + SourceIndex(4) -4 >Emitted(59, 20) Source(3, 20) + SourceIndex(4) -5 >Emitted(59, 21) Source(3, 21) + SourceIndex(4) -6 >Emitted(59, 41) Source(3, 41) + SourceIndex(4) -7 >Emitted(59, 42) Source(3, 42) + SourceIndex(4) -8 >Emitted(59, 43) Source(3, 43) + SourceIndex(4) +1->Emitted(54, 9) Source(3, 9) + SourceIndex(4) +2 >Emitted(54, 16) Source(3, 16) + SourceIndex(4) +3 >Emitted(54, 17) Source(3, 17) + SourceIndex(4) +4 >Emitted(54, 20) Source(3, 20) + SourceIndex(4) +5 >Emitted(54, 21) Source(3, 21) + SourceIndex(4) +6 >Emitted(54, 41) Source(3, 41) + SourceIndex(4) +7 >Emitted(54, 42) Source(3, 42) + SourceIndex(4) +8 >Emitted(54, 43) Source(3, 43) + SourceIndex(4) --- >>> }; 1 >^^^^ @@ -2359,8 +2264,8 @@ sourceFile:../../../second/second_part2.ts 1 > > 2 > } -1 >Emitted(60, 5) Source(4, 5) + SourceIndex(4) -2 >Emitted(60, 6) Source(4, 6) + SourceIndex(4) +1 >Emitted(55, 5) Source(4, 5) + SourceIndex(4) +2 >Emitted(55, 6) Source(4, 6) + SourceIndex(4) --- >>> return C; 1->^^^^ @@ -2368,8 +2273,8 @@ sourceFile:../../../second/second_part2.ts 1-> > 2 > } -1->Emitted(61, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(61, 13) Source(5, 2) + SourceIndex(4) +1->Emitted(56, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(56, 13) Source(5, 2) + SourceIndex(4) --- >>>}()); 1 > @@ -2385,10 +2290,10 @@ sourceFile:../../../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(62, 1) Source(5, 1) + SourceIndex(4) -2 >Emitted(62, 2) Source(5, 2) + SourceIndex(4) -3 >Emitted(62, 2) Source(1, 1) + SourceIndex(4) -4 >Emitted(62, 6) Source(5, 2) + SourceIndex(4) +1 >Emitted(57, 1) Source(5, 1) + SourceIndex(4) +2 >Emitted(57, 2) Source(5, 2) + SourceIndex(4) +3 >Emitted(57, 2) Source(1, 1) + SourceIndex(4) +4 >Emitted(57, 6) Source(5, 2) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -2412,14 +2317,14 @@ sourceFile:../../third_part1.ts 6 > C 7 > () 8 > ; -1->Emitted(63, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(63, 5) Source(1, 5) + SourceIndex(5) -3 >Emitted(63, 6) Source(1, 6) + SourceIndex(5) -4 >Emitted(63, 9) Source(1, 9) + SourceIndex(5) -5 >Emitted(63, 13) Source(1, 13) + SourceIndex(5) -6 >Emitted(63, 14) Source(1, 14) + SourceIndex(5) -7 >Emitted(63, 16) Source(1, 16) + SourceIndex(5) -8 >Emitted(63, 17) Source(1, 17) + SourceIndex(5) +1->Emitted(58, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(58, 5) Source(1, 5) + SourceIndex(5) +3 >Emitted(58, 6) Source(1, 6) + SourceIndex(5) +4 >Emitted(58, 9) Source(1, 9) + SourceIndex(5) +5 >Emitted(58, 13) Source(1, 13) + SourceIndex(5) +6 >Emitted(58, 14) Source(1, 14) + SourceIndex(5) +7 >Emitted(58, 16) Source(1, 16) + SourceIndex(5) +8 >Emitted(58, 17) Source(1, 17) + SourceIndex(5) --- >>>c.doSomething(); 1-> @@ -2436,12 +2341,12 @@ sourceFile:../../third_part1.ts 4 > doSomething 5 > () 6 > ; -1->Emitted(64, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(64, 2) Source(2, 2) + SourceIndex(5) -3 >Emitted(64, 3) Source(2, 3) + SourceIndex(5) -4 >Emitted(64, 14) Source(2, 14) + SourceIndex(5) -5 >Emitted(64, 16) Source(2, 16) + SourceIndex(5) -6 >Emitted(64, 17) Source(2, 17) + SourceIndex(5) +1->Emitted(59, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(59, 2) Source(2, 2) + SourceIndex(5) +3 >Emitted(59, 3) Source(2, 3) + SourceIndex(5) +4 >Emitted(59, 14) Source(2, 14) + SourceIndex(5) +5 >Emitted(59, 16) Source(2, 16) + SourceIndex(5) +6 >Emitted(59, 17) Source(2, 17) + SourceIndex(5) --- >>>function forthirdthird_part1Rest() { 1-> @@ -2452,9 +2357,9 @@ sourceFile:../../third_part1.ts > 2 >function 3 > forthirdthird_part1Rest -1->Emitted(65, 1) Source(3, 1) + SourceIndex(5) -2 >Emitted(65, 10) Source(3, 10) + SourceIndex(5) -3 >Emitted(65, 33) Source(3, 33) + SourceIndex(5) +1->Emitted(60, 1) Source(3, 1) + SourceIndex(5) +2 >Emitted(60, 10) Source(3, 10) + SourceIndex(5) +3 >Emitted(60, 33) Source(3, 33) + SourceIndex(5) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -2508,31 +2413,31 @@ sourceFile:../../third_part1.ts 23> { b, ...rest } 24> = { a: 10, b: 30, yy: 30 } 25> ; -1->Emitted(66, 5) Source(4, 1) + SourceIndex(5) -2 >Emitted(66, 9) Source(4, 7) + SourceIndex(5) -3 >Emitted(66, 14) Source(4, 24) + SourceIndex(5) -4 >Emitted(66, 16) Source(4, 26) + SourceIndex(5) -5 >Emitted(66, 17) Source(4, 27) + SourceIndex(5) -6 >Emitted(66, 19) Source(4, 29) + SourceIndex(5) -7 >Emitted(66, 21) Source(4, 31) + SourceIndex(5) -8 >Emitted(66, 23) Source(4, 33) + SourceIndex(5) -9 >Emitted(66, 24) Source(4, 34) + SourceIndex(5) -10>Emitted(66, 26) Source(4, 36) + SourceIndex(5) -11>Emitted(66, 28) Source(4, 38) + SourceIndex(5) -12>Emitted(66, 30) Source(4, 40) + SourceIndex(5) -13>Emitted(66, 32) Source(4, 42) + SourceIndex(5) -14>Emitted(66, 34) Source(4, 44) + SourceIndex(5) -15>Emitted(66, 36) Source(4, 46) + SourceIndex(5) -16>Emitted(66, 38) Source(4, 48) + SourceIndex(5) -17>Emitted(66, 40) Source(4, 9) + SourceIndex(5) -18>Emitted(66, 41) Source(4, 10) + SourceIndex(5) -19>Emitted(66, 48) Source(4, 10) + SourceIndex(5) -20>Emitted(66, 50) Source(4, 15) + SourceIndex(5) -21>Emitted(66, 54) Source(4, 19) + SourceIndex(5) -22>Emitted(66, 68) Source(4, 7) + SourceIndex(5) -23>Emitted(66, 73) Source(4, 21) + SourceIndex(5) -24>Emitted(66, 74) Source(4, 48) + SourceIndex(5) -25>Emitted(66, 75) Source(4, 49) + SourceIndex(5) +1->Emitted(61, 5) Source(4, 1) + SourceIndex(5) +2 >Emitted(61, 9) Source(4, 7) + SourceIndex(5) +3 >Emitted(61, 14) Source(4, 24) + SourceIndex(5) +4 >Emitted(61, 16) Source(4, 26) + SourceIndex(5) +5 >Emitted(61, 17) Source(4, 27) + SourceIndex(5) +6 >Emitted(61, 19) Source(4, 29) + SourceIndex(5) +7 >Emitted(61, 21) Source(4, 31) + SourceIndex(5) +8 >Emitted(61, 23) Source(4, 33) + SourceIndex(5) +9 >Emitted(61, 24) Source(4, 34) + SourceIndex(5) +10>Emitted(61, 26) Source(4, 36) + SourceIndex(5) +11>Emitted(61, 28) Source(4, 38) + SourceIndex(5) +12>Emitted(61, 30) Source(4, 40) + SourceIndex(5) +13>Emitted(61, 32) Source(4, 42) + SourceIndex(5) +14>Emitted(61, 34) Source(4, 44) + SourceIndex(5) +15>Emitted(61, 36) Source(4, 46) + SourceIndex(5) +16>Emitted(61, 38) Source(4, 48) + SourceIndex(5) +17>Emitted(61, 40) Source(4, 9) + SourceIndex(5) +18>Emitted(61, 41) Source(4, 10) + SourceIndex(5) +19>Emitted(61, 48) Source(4, 10) + SourceIndex(5) +20>Emitted(61, 50) Source(4, 15) + SourceIndex(5) +21>Emitted(61, 54) Source(4, 19) + SourceIndex(5) +22>Emitted(61, 68) Source(4, 7) + SourceIndex(5) +23>Emitted(61, 73) Source(4, 21) + SourceIndex(5) +24>Emitted(61, 74) Source(4, 48) + SourceIndex(5) +25>Emitted(61, 75) Source(4, 49) + SourceIndex(5) --- >>>} 1 > @@ -2541,8 +2446,8 @@ sourceFile:../../third_part1.ts 1 > > 2 >} -1 >Emitted(67, 1) Source(5, 1) + SourceIndex(5) -2 >Emitted(67, 2) Source(5, 2) + SourceIndex(5) +1 >Emitted(62, 1) Source(5, 1) + SourceIndex(5) +2 >Emitted(62, 2) Source(5, 2) + SourceIndex(5) --- >>>//# sourceMappingURL=third-output.js.map @@ -2588,20 +2493,20 @@ sourceFile:../../third_part1.ts }, { "pos": 1407, - "end": 1908, + "end": 1798, "kind": "prepend", "data": "../../../2/second-output.js", "texts": [ { "pos": 1407, - "end": 1908, + "end": 1798, "kind": "text" } ] }, { - "pos": 1908, - "end": 2061, + "pos": 1798, + "end": 1951, "kind": "text" } ], @@ -2705,9 +2610,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (1407-1908):: ../../../2/second-output.js texts:: 1 +prepend: (1407-1798):: ../../../2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1407-1908) +text: (1407-1798) var N; (function (N) { function f() { @@ -2715,12 +2620,7 @@ var N; } f(); })(N || (N = {})); -function secondsecond_part1Spread() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i] = arguments[_i]; - } -} +function secondsecond_part1Spread() { } secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30])); var C = (function () { function C() { @@ -2732,7 +2632,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (1908-2061) +text: (1798-1951) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { diff --git a/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-composite.js b/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-composite.js index b9393ff3f07b6..f8b5373aaf4cb 100644 --- a/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-composite.js +++ b/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-composite.js @@ -140,10 +140,6 @@ declare function someFunc(arguments: boolean, ...rest: any[]): void; //// [/src/project/src/noChangeFileWithEmitSpecificError.js] function someFunc(arguments) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } } diff --git a/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-incremental-declaration.js b/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-incremental-declaration.js index 557af80a87bf8..f539142dbc1fd 100644 --- a/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-incremental-declaration.js +++ b/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-incremental-declaration.js @@ -140,10 +140,6 @@ declare function someFunc(arguments: boolean, ...rest: any[]): void; //// [/src/project/src/noChangeFileWithEmitSpecificError.js] function someFunc(arguments) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } } diff --git a/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-incremental.js b/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-incremental.js index 2c210ce4758d6..f0c2f56048de0 100644 --- a/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-incremental.js +++ b/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-incremental.js @@ -111,10 +111,6 @@ exports.writeLog = writeLog; //// [/src/project/src/noChangeFileWithEmitSpecificError.js] function someFunc(arguments) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } } diff --git a/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-with-initial-noEmit-composite.js b/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-with-initial-noEmit-composite.js index 75d42a6e6c103..78dcc8fb99baa 100644 --- a/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-with-initial-noEmit-composite.js +++ b/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-with-initial-noEmit-composite.js @@ -265,10 +265,6 @@ declare function someFunc(arguments: boolean, ...rest: any[]): void; //// [/src/project/src/noChangeFileWithEmitSpecificError.js] function someFunc(arguments) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } } diff --git a/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-with-initial-noEmit-incremental-declaration.js b/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-with-initial-noEmit-incremental-declaration.js index 767f6b30912a9..cf764fd3077a3 100644 --- a/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-with-initial-noEmit-incremental-declaration.js +++ b/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-with-initial-noEmit-incremental-declaration.js @@ -266,10 +266,6 @@ declare function someFunc(arguments: boolean, ...rest: any[]): void; //// [/src/project/src/noChangeFileWithEmitSpecificError.js] function someFunc(arguments) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } } diff --git a/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-with-initial-noEmit-incremental.js b/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-with-initial-noEmit-incremental.js index a1824d46678dc..9ae3da3291afe 100644 --- a/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-with-initial-noEmit-incremental.js +++ b/tests/baselines/reference/tsc/incremental/initial-build/noEmit-changes-with-initial-noEmit-incremental.js @@ -236,10 +236,6 @@ exports.writeLog = writeLog; //// [/src/project/src/noChangeFileWithEmitSpecificError.js] function someFunc(arguments) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } } diff --git a/tests/baselines/reference/tsxAttributesHasInferrableIndex.js b/tests/baselines/reference/tsxAttributesHasInferrableIndex.js index 0cc23d34c4095..7346a7f917d22 100644 --- a/tests/baselines/reference/tsxAttributesHasInferrableIndex.js +++ b/tests/baselines/reference/tsxAttributesHasInferrableIndex.js @@ -19,10 +19,6 @@ const b = //// [tsxAttributesHasInferrableIndex.js] "use strict"; function createElement(name, attributes) { - var contents = []; - for (var _i = 2; _i < arguments.length; _i++) { - contents[_i - 2] = arguments[_i]; - } return name; } function Button(attributes, contents) { diff --git a/tests/baselines/reference/typeGuardFunctionErrors.js b/tests/baselines/reference/typeGuardFunctionErrors.js index 7e640fea6d7db..409e26caa3e1c 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.js +++ b/tests/baselines/reference/typeGuardFunctionErrors.js @@ -290,10 +290,6 @@ is; C; // Reference to rest parameter function b4() { - var a = []; - for (var _i = 0; _i < arguments.length; _i++) { - a[_i] = arguments[_i]; - } return true; } // Reference to binding pattern diff --git a/tests/baselines/reference/undeclaredModuleError.js b/tests/baselines/reference/undeclaredModuleError.js index 927df99766eb4..0cc3acba1176a 100644 --- a/tests/baselines/reference/undeclaredModuleError.js +++ b/tests/baselines/reference/undeclaredModuleError.js @@ -20,12 +20,7 @@ define(["require", "exports", "fs"], function (require, exports, fs) { "use strict"; exports.__esModule = true; function readdir(path, accept, callback) { } - function join() { - var paths = []; - for (var _i = 0; _i < arguments.length; _i++) { - paths[_i] = arguments[_i]; - } - } + function join() { } function instrumentFile(covFileDir, covFileName, originalFilePath) { fs.readFile(originalFilePath, function () { readdir(covFileDir, function () { diff --git a/tests/baselines/reference/underscoreTest1.js b/tests/baselines/reference/underscoreTest1.js index 63e4c16ea1ea0..ed6bce4f9f4fb 100644 --- a/tests/baselines/reference/underscoreTest1.js +++ b/tests/baselines/reference/underscoreTest1.js @@ -978,12 +978,7 @@ $('#underscore_button').bind('click', buttonView.onClick); var fibonacci = _.memoize(function (n) { return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2); }); -var log = _.bind(function (message) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } -}, Date); +var log = _.bind(function (message) { }, Date); _.delay(log, 1000, 'logged later'); _.defer(function () { alert('deferred'); }); var updatePosition = function () { return alert('updating position...'); }; diff --git a/tests/baselines/reference/unionTypeCallSignatures3.js b/tests/baselines/reference/unionTypeCallSignatures3.js index b3c24a0e60a60..d25e4185f7403 100644 --- a/tests/baselines/reference/unionTypeCallSignatures3.js +++ b/tests/baselines/reference/unionTypeCallSignatures3.js @@ -15,25 +15,10 @@ fUnion(""); // All constituents can be called by passing a single string. //// [unionTypeCallSignatures3.js] function f1(s) { } function f2(s) { } -function f3() { - var s = []; - for (var _i = 0; _i < arguments.length; _i++) { - s[_i] = arguments[_i]; - } -} +function f3() { } function f4(s, s2) { } function f5(s, n) { } -function f6(s) { - var n = []; - for (var _i = 1; _i < arguments.length; _i++) { - n[_i - 1] = arguments[_i]; - } -} -function f7(s) { - var sRest = []; - for (var _i = 1; _i < arguments.length; _i++) { - sRest[_i - 1] = arguments[_i]; - } -} +function f6(s) { } +function f7(s) { } var fUnion; fUnion(""); // All constituents can be called by passing a single string. diff --git a/tests/baselines/reference/unusedParametersWithUnderscore.js b/tests/baselines/reference/unusedParametersWithUnderscore.js index bb87e432a7d8c..abb67216de0ec 100644 --- a/tests/baselines/reference/unusedParametersWithUnderscore.js +++ b/tests/baselines/reference/unusedParametersWithUnderscore.js @@ -32,16 +32,8 @@ function f3(_c) { var _a = _c[0], __b = _c[2]; } function f4() { - var arg = []; - for (var _i = 0; _i < arguments.length; _i++) { - arg[_i] = arguments[_i]; - } } function f5() { - var _arg = []; - for (var _i = 0; _i < arguments.length; _i++) { - _arg[_i] = arguments[_i]; - } } function f6(arg, _arg) { } diff --git a/tests/baselines/reference/varArgConstructorMemberParameter.js b/tests/baselines/reference/varArgConstructorMemberParameter.js index 095b36a9af77e..b0f3b46db9a3f 100644 --- a/tests/baselines/reference/varArgConstructorMemberParameter.js +++ b/tests/baselines/reference/varArgConstructorMemberParameter.js @@ -15,10 +15,6 @@ class Foo3 { //// [varArgConstructorMemberParameter.js] var Foo1 = /** @class */ (function () { function Foo1() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } } return Foo1; }()); @@ -30,10 +26,6 @@ var Foo2 = /** @class */ (function () { }()); var Foo3 = /** @class */ (function () { function Foo3() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } this.args = args; } return Foo3; diff --git a/tests/baselines/reference/varArgParamTypeCheck.js b/tests/baselines/reference/varArgParamTypeCheck.js index 2807ca970580b..5d8a60a564a4b 100644 --- a/tests/baselines/reference/varArgParamTypeCheck.js +++ b/tests/baselines/reference/varArgParamTypeCheck.js @@ -23,10 +23,6 @@ sequence( //// [varArgParamTypeCheck.js] function sequence() { - var sequences = []; - for (var _i = 0; _i < arguments.length; _i++) { - sequences[_i] = arguments[_i]; - } } function callback(clb) { } diff --git a/tests/baselines/reference/varArgWithNoParamName.js b/tests/baselines/reference/varArgWithNoParamName.js index 3aa9fcbabb0a7..b61400ff7395a 100644 --- a/tests/baselines/reference/varArgWithNoParamName.js +++ b/tests/baselines/reference/varArgWithNoParamName.js @@ -2,9 +2,4 @@ function t1(...) {} //// [varArgWithNoParamName.js] -function t1() { - var = []; - for (var _i = 0; _i < arguments.length; _i++) { - [_i] = arguments[_i]; - } -} +function t1() { } diff --git a/tests/baselines/reference/vararg.js b/tests/baselines/reference/vararg.js index 9e5aa0c797255..20ec2e2f0fbdf 100644 --- a/tests/baselines/reference/vararg.js +++ b/tests/baselines/reference/vararg.js @@ -57,10 +57,6 @@ var M; return result; }; C.prototype.fnope = function (x) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } }; C.prototype.fonly = function () { var rest = []; From 564ece6da4cd23e3cf721ba5078daf372d757e15 Mon Sep 17 00:00:00 2001 From: kingwl Date: Mon, 22 Jun 2020 16:03:15 +0800 Subject: [PATCH 2/7] make linter happy --- 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 2e4c0b58b9477..6458aa3ec2e6e 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -21698,7 +21698,7 @@ namespace ts { if (containerFunctionLikeDeclaration) { const topLevelStatementInContainer = findAncestor(node, n => { return n.parent && (isBlock(n.parent) ? n.parent.parent === containerFunctionLikeDeclaration : n.parent === containerFunctionLikeDeclaration); - }) + }); if (topLevelStatementInContainer) { (>topLevelStatementInContainer).flags |= NodeFlags.ContainsRestParameterReference; } From ff4ac8f465c6f3063a2539feced7f86277143161 Mon Sep 17 00:00:00 2001 From: kingwl Date: Mon, 22 Jun 2020 19:42:43 +0800 Subject: [PATCH 3/7] Emit node before using --- src/compiler/checker.ts | 14 +- src/compiler/transformers/es2015.ts | 28 +- src/compiler/types.ts | 2 + .../amdDeclarationEmitNoExtraDeclare.js | 4 - tests/baselines/reference/callWithSpread.js | 2 +- .../reference/capturedLetConstInLoop13.js | 8 +- .../genericRestParameters1.errors.txt | 190 ----- .../reference/genericRestParameters1.js | 332 +------- .../reference/genericRestParameters1.symbols | 654 +-------------- .../reference/genericRestParameters1.types | 781 ------------------ .../inferFromGenericFunctionReturnTypes1.js | 4 + .../inferFromGenericFunctionReturnTypes2.js | 4 + tests/baselines/reference/inferTypes1.js | 4 + .../reference/keyofAndIndexedAccess.js | 8 +- .../reference/literalTypeWidening.js | 2 +- .../reference/mixinClassesAnnotated.js | 4 - .../reference/mixinClassesAnonymous.js | 4 - .../reference/mixinPrivateAndProtected.js | 4 - .../reference/mixingApparentTypeOverrides.js | 4 - tests/baselines/reference/nonArrayRestArgs.js | 4 + .../reference/recursiveTypeRelations.js | 4 + .../restParameterInDownlevelGenerator.js | 6 +- .../restParameterNoTypeAnnotation.js | 4 + tests/baselines/reference/sourceMapSample.js | 4 +- .../reference/sourceMapSample.js.map | 4 +- .../reference/sourceMapSample.sourcemap.txt | 127 +-- .../reference/sourceMapValidationClasses.js | 4 +- .../sourceMapValidationClasses.js.map | 4 +- .../sourceMapValidationClasses.sourcemap.txt | 144 ++-- tests/baselines/reference/vararg.js | 4 +- .../types/rest/genericRestParameters1.ts | 163 +--- 31 files changed, 232 insertions(+), 2293 deletions(-) delete mode 100644 tests/baselines/reference/genericRestParameters1.errors.txt diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 6458aa3ec2e6e..3bd04dff1bda6 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -21693,13 +21693,23 @@ namespace ts { return getTypeOfSymbol(symbol); } - if ((symbol.flags & SymbolFlags.Value) && symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isRestParameter(symbol.valueDeclaration)) { + if ((symbol.flags & SymbolFlags.Value) && symbol.valueDeclaration && symbol.valueDeclaration !== node.parent && + isParameter(symbol.valueDeclaration) && isRestParameter(symbol.valueDeclaration) && + !(symbol.valueDeclaration.flags & NodeFlags.RestParameterMustEmitAtTop)) { const containerFunctionLikeDeclaration = findAncestor(symbol.valueDeclaration, isFunctionLikeDeclaration); if (containerFunctionLikeDeclaration) { + let insideOtherFunctionLikeScope = false; const topLevelStatementInContainer = findAncestor(node, n => { + if (isFunctionLikeDeclaration(n)) { + insideOtherFunctionLikeScope = true; + return "quit"; + } return n.parent && (isBlock(n.parent) ? n.parent.parent === containerFunctionLikeDeclaration : n.parent === containerFunctionLikeDeclaration); }); - if (topLevelStatementInContainer) { + if (insideOtherFunctionLikeScope) { + (>symbol.valueDeclaration).flags |= NodeFlags.RestParameterMustEmitAtTop; + } + else if(topLevelStatementInContainer) { (>topLevelStatementInContainer).flags |= NodeFlags.ContainsRestParameterReference; } } diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index 9e96db984c6f8..d104e5fb15aed 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -976,7 +976,6 @@ namespace ts { let statementOffset = 0; if (!hasSynthesizedSuper) statementOffset = factory.copyStandardPrologue(constructor.body.statements, prologue, /*ensureUseStrict*/ false); addDefaultValueAssignmentsIfNeeded(statements, constructor); - addRestParameterIfNeeded(statements, constructor, hasSynthesizedSuper); if (!hasSynthesizedSuper) statementOffset = factory.copyCustomPrologue(constructor.body.statements, statements, statementOffset, visitor); // If the first statement is a call to `super()`, visit the statement directly @@ -998,6 +997,7 @@ namespace ts { // visit the remaining statements addRange(statements, visitNodes(constructor.body.statements, visitor, isStatement, /*start*/ statementOffset)); + addRestParameterIfNeeded(statements, constructor, hasSynthesizedSuper); factory.mergeLexicalEnvironment(prologue, endLexicalEnvironment()); insertCaptureNewTargetIfNeeded(prologue, constructor, /*copyOnWrite*/ false); @@ -1354,11 +1354,9 @@ namespace ts { return false; } - const firstStatementContainsRestParameter = node.body && (isBlock(node.body) ? - find(node.body.statements, stmt => !!(stmt.flags & NodeFlags.ContainsRestParameterReference)) : - (node.body.flags & NodeFlags.ContainsRestParameterReference) ? node.body : undefined - ); - if (!firstStatementContainsRestParameter) { + const firstStatementContainsRestParameter = find(statements, stmt => !!(getOriginalNode(stmt).flags & NodeFlags.ContainsRestParameterReference)); + + if (!firstStatementContainsRestParameter && !((getOriginalNode(parameter).flags & NodeFlags.RestParameterMustEmitAtTop))) { return false; } @@ -1453,7 +1451,14 @@ namespace ts { ); } - insertStatementsAfterCustomPrologue(statements, prologueStatements); + if (!firstStatementContainsRestParameter || (getOriginalNode(parameter).flags & NodeFlags.RestParameterMustEmitAtTop) || !node.body || isExpression(node.body)) { + insertStatementsAfterCustomPrologue(statements, prologueStatements); + } + else { + const idx = statements.indexOf(firstStatementContainsRestParameter) + Debug.assert(idx > -1) + statements.splice(idx, 0, ...prologueStatements) + } return true; } @@ -1889,7 +1894,6 @@ namespace ts { } multiLine = addDefaultValueAssignmentsIfNeeded(statements, node) || multiLine; - multiLine = addRestParameterIfNeeded(statements, node, /*inConstructorWithSynthesizedSuper*/ false) || multiLine; if (isBlock(body)) { // addCustomPrologue puts already-existing directives at the beginning of the target statement-array @@ -1924,6 +1928,7 @@ namespace ts { const expression = visitNode(body, visitor, isExpression); const returnStatement = factory.createReturnStatement(expression); + setOriginalNode(returnStatement, expression) setTextRange(returnStatement, body); moveSyntheticComments(returnStatement, body); setEmitFlags(returnStatement, EmitFlags.NoTokenSourceMaps | EmitFlags.NoTrailingSourceMap | EmitFlags.NoTrailingComments); @@ -1934,6 +1939,8 @@ namespace ts { closeBraceLocation = body; } + multiLine = addRestParameterIfNeeded(statements, node, /*inConstructorWithSynthesizedSuper*/ false) || multiLine; + factory.mergeLexicalEnvironment(prologue, endLexicalEnvironment()); insertCaptureNewTargetIfNeeded(prologue, node, /*copyOnWrite*/ false); insertCaptureThisForNodeIfNeeded(prologue, node); @@ -2474,6 +2481,7 @@ namespace ts { ), /*location*/ node ); + setOriginalNode(forStatement, node); // Disable trailing source maps for the OpenParenToken to align source map emit with the old emitter. setEmitFlags(forStatement, EmitFlags.NoTokenTrailingSourceMaps); @@ -2525,7 +2533,7 @@ namespace ts { EmitFlags.NoTokenTrailingSourceMaps ); - return factory.createTryStatement( + const stmt = factory.createTryStatement( factory.createBlock([ factory.restoreEnclosingLabel( forStatement, @@ -2590,6 +2598,8 @@ namespace ts { ) ]) ); + setOriginalNode(stmt, node); + return stmt; } /** diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 5b2f8898f4746..ad349a9fa45d8 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -758,6 +758,8 @@ namespace ts { /* @internal */ ContainsRestParameterReference = 1 << 28, // If contains rest parameter reference + /* @internal */ RestParameterMustEmitAtTop = 1 << 29, // If rest parameter must emit at top of function + BlockScoped = Let | Const, ReachabilityCheckFlags = HasImplicitReturn | HasExplicitReturn, diff --git a/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.js b/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.js index f8f25a4e1aa86..8d3d1c3fa0638 100644 --- a/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.js +++ b/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.js @@ -43,10 +43,6 @@ define("Configurable", ["require", "exports"], function (require, exports) { return /** @class */ (function (_super) { __extends(class_1, _super); function class_1() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } return _super.apply(this, args) || this; } return class_1; diff --git a/tests/baselines/reference/callWithSpread.js b/tests/baselines/reference/callWithSpread.js index 672f3e82d7f56..743d75c271df5 100644 --- a/tests/baselines/reference/callWithSpread.js +++ b/tests/baselines/reference/callWithSpread.js @@ -107,11 +107,11 @@ xa[1].foo(1, 2, "abc"); (_g = xa[1]).foo.apply(_g, [1, 2, "abc"]); var C = /** @class */ (function () { function C(x, y) { + this.foo(x, y); var z = []; for (var _i = 2; _i < arguments.length; _i++) { z[_i - 2] = arguments[_i]; } - this.foo(x, y); this.foo.apply(this, __spreadArrays([x, y], z)); } C.prototype.foo = function (x, y) { diff --git a/tests/baselines/reference/capturedLetConstInLoop13.js b/tests/baselines/reference/capturedLetConstInLoop13.js index 628faa1048587..4fc90d2a5b5bb 100644 --- a/tests/baselines/reference/capturedLetConstInLoop13.js +++ b/tests/baselines/reference/capturedLetConstInLoop13.js @@ -29,10 +29,6 @@ var Main = /** @class */ (function () { } Main.prototype.register = function () { var _this = this; - var names = []; - for (var _i = 0; _i < arguments.length; _i++) { - names[_i] = arguments[_i]; - } var _loop_1 = function (name_1) { var _a; this_1.bar((_a = {}, @@ -40,6 +36,10 @@ var Main = /** @class */ (function () { _a)); }; var this_1 = this; + var names = []; + for (var _i = 0; _i < arguments.length; _i++) { + names[_i] = arguments[_i]; + } for (var _a = 0, names_1 = names; _a < names_1.length; _a++) { var name_1 = names_1[_a]; _loop_1(name_1); diff --git a/tests/baselines/reference/genericRestParameters1.errors.txt b/tests/baselines/reference/genericRestParameters1.errors.txt deleted file mode 100644 index 707e86a94dd8f..0000000000000 --- a/tests/baselines/reference/genericRestParameters1.errors.txt +++ /dev/null @@ -1,190 +0,0 @@ -tests/cases/conformance/types/rest/genericRestParameters1.ts(22,4): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. - Type 'string' is not assignable to type 'number'. -tests/cases/conformance/types/rest/genericRestParameters1.ts(31,4): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. - Type 'string' is not assignable to type 'number'. -tests/cases/conformance/types/rest/genericRestParameters1.ts(135,23): error TS2344: Type 'Function' does not satisfy the constraint '(...args: any) => any'. - Type 'Function' provides no match for the signature '(...args: any): any'. -tests/cases/conformance/types/rest/genericRestParameters1.ts(164,1): error TS2322: Type '(a: never) => void' is not assignable to type '(...args: any[]) => void'. - Types of parameters 'a' and 'args' are incompatible. - Type 'any' is not assignable to type 'never'. - - -==== tests/cases/conformance/types/rest/genericRestParameters1.ts (4 errors) ==== - declare let f1: (...x: [number, string, boolean]) => void; - declare let f2: (x0: number, x1: string, x2: boolean) => void; - - f1 = f2; - f2 = f1; - - declare const t3: [number, string, boolean]; - declare const t2: [string, boolean]; - declare const t1: [boolean]; - declare const t0: []; - - declare const ns: [number, string]; - declare const sn: [string, number]; - - f1(42, "hello", true); - f1(t3[0], t3[1], t3[2]); - f1(...t3); - f1(42, ...t2); - f1(42, "hello", ...t1); - f1(42, "hello", true, ...t0); - f1(ns[0], ns[1], true); - f1(...ns, true); // FIXME: Error, since ...ns is considered as string|number here - ~~~~~ -!!! error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. -!!! error TS2345: Type 'string' is not assignable to type 'number'. - - f2(42, "hello", true); - f2(t3[0], t3[1], t3[2]); - f2(...t3); - f2(42, ...t2); - f2(42, "hello", ...t1); - f2(42, "hello", true, ...t0); - f2(ns[0], ns[1], true); - f2(...ns, true); // FIXME: Error, since ...ns is considered as string|number here - ~~~~~ -!!! error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. -!!! error TS2345: Type 'string' is not assignable to type 'number'. - - declare function f10(...args: T): T; - - const x10 = f10(42, "hello", true); // [number, string, boolean] - const x11 = f10(42, "hello"); // [number, string] - const x12 = f10(42); // [number] - const x13 = f10(); // [] - const x14 = f10(...t3); // [number, string, boolean] - const x15 = f10(42, ...t2); // [number, string, boolean] - const x16 = f10(42, "hello", ...t1); // [number, string, boolean] - const x17 = f10(42, "hello", true, ...t0); // [number, string, boolean] - const x18 = f10(...ns, true); // (string | number | boolean)[] - - function g10(u: U, v: V) { - let x1 = f10(...u); // U - let x2 = f10(...v); // V - let x3 = f10(1, ...u); // [number, ...string[]] - let x4 = f10(...u, ...v); // (string | number)[] - } - - declare function f11(...args: T): T; - - const z10 = f11(42, "hello", true); // [42, "hello", true] - const z11 = f11(42, "hello"); // [42, "hello"] - const z12 = f11(42); // [42] - const z13 = f11(); // [] - const z14 = f11(...t3); // [number, string, boolean] - const z15 = f11(42, ...t2); // [42, string, boolean] - const z16 = f11(42, "hello", ...t1); // [42, "hello", boolean] - const z17 = f11(42, "hello", true, ...t0); // [42, "hello", true] - const z18 = f11(...ns, true); // (string | number | true)[] - - function g11(u: U, v: V) { - let x1 = f11(...u); // U - let x2 = f11(...v); // V - let x3 = f11(1, ...u); // [1, ...string[]] - let x4 = f11(...u, ...v); // (string | number)[] - } - - function call(f: (...args: T) => U, ...args: T) { - return f(...args); - } - - function callr(args: T, f: (...args: T) => U) { - return f(...args); - } - - declare function f15(a: string, b: number): string | number; - declare function f16(a: A, b: B): A | B; - - let x20 = call((x, y) => x + y, 10, 20); // number - let x21 = call((x, y) => x + y, 10, "hello"); // string - let x22 = call(f15, "hello", 42); // string | number - let x23 = call(f16, "hello", 42); // unknown - let x24 = call<[string, number], string | number>(f16, "hello", 42); // string | number - - let x30 = callr(sn, (x, y) => x + y); // string - let x31 = callr(sn, f15); // string | number - let x32 = callr(sn, f16); // string | number - - function bind(f: (x: T, ...rest: U) => V, x: T) { - return (...rest: U) => f(x, ...rest); - } - - declare const f20: (x: number, y: string, z: boolean) => string[]; - - const f21 = bind(f20, 42); // (y: string, z: boolean) => string[] - const f22 = bind(f21, "hello"); // (z: boolean) => string[] - const f23 = bind(f22, true); // () => string[] - - f20(42, "hello", true); - f21("hello", true); - f22(true); - f23(); - - declare const g20: (x: number, y?: string, z?: boolean) => string[]; - - const g21 = bind(g20, 42); // (y: string, z: boolean) => string[] - const g22 = bind(g21, "hello"); // (z: boolean) => string[] - const g23 = bind(g22, true); // () => string[] - - g20(42, "hello", true); - g20(42, "hello"); - g20(42); - g21("hello", true); - g21("hello"); - g21(); - g22(true); - g22(); - g23(); - - declare function f30 any)[]>(x: T, ...args: U): U; - - const c30 = f30(42, x => "" + x, x => x + 1); // [(x: number) => string, (x: number) => number] - - type T01 = Parameters<(x: number, y: string, z: boolean) => void>; - type T02 = Parameters<(...args: [number, string, boolean]) => void>; - type T03 = ConstructorParameters void>; - type T04 = ConstructorParameters void>; - type T05 = Parameters<(...args: T[]) => void>; - type T06 = ConstructorParameters void>; - type T07 = Parameters<(...args: T) => void>; - type T08 = ConstructorParameters void>; - type T09 = Parameters; - ~~~~~~~~ -!!! error TS2344: Type 'Function' does not satisfy the constraint '(...args: any) => any'. -!!! error TS2344: Type 'Function' provides no match for the signature '(...args: any): any'. - - type Record1 = { - move: [number, 'left' | 'right']; - jump: [number, 'up' | 'down']; - stop: string; - done: []; - } - - type EventType = { - emit(e: K, ...payload: T[K] extends any[] ? T[K] : [T[K]]): void; - } - - declare var events: EventType; - events.emit('move', 10, 'left'); - events.emit('jump', 20, 'up'); - events.emit('stop', 'Bye!'); - events.emit('done'); - - // Repro from #25871 - - declare var ff1: (... args: any[]) => void; - - declare var ff2: () => void; - declare var ff3: (...args: []) => void; - declare var ff4: (a: never) => void; - - ff1 = ff2; - ff1 = ff3; - ff1 = ff4; // Error - ~~~ -!!! error TS2322: Type '(a: never) => void' is not assignable to type '(...args: any[]) => void'. -!!! error TS2322: Types of parameters 'a' and 'args' are incompatible. -!!! error TS2322: Type 'any' is not assignable to type 'never'. - \ No newline at end of file diff --git a/tests/baselines/reference/genericRestParameters1.js b/tests/baselines/reference/genericRestParameters1.js index 0e094d0f288fd..009dca8d67690 100644 --- a/tests/baselines/reference/genericRestParameters1.js +++ b/tests/baselines/reference/genericRestParameters1.js @@ -1,169 +1,7 @@ //// [genericRestParameters1.ts] -declare let f1: (...x: [number, string, boolean]) => void; -declare let f2: (x0: number, x1: string, x2: boolean) => void; - -f1 = f2; -f2 = f1; - -declare const t3: [number, string, boolean]; -declare const t2: [string, boolean]; -declare const t1: [boolean]; -declare const t0: []; - -declare const ns: [number, string]; -declare const sn: [string, number]; - -f1(42, "hello", true); -f1(t3[0], t3[1], t3[2]); -f1(...t3); -f1(42, ...t2); -f1(42, "hello", ...t1); -f1(42, "hello", true, ...t0); -f1(ns[0], ns[1], true); -f1(...ns, true); // FIXME: Error, since ...ns is considered as string|number here - -f2(42, "hello", true); -f2(t3[0], t3[1], t3[2]); -f2(...t3); -f2(42, ...t2); -f2(42, "hello", ...t1); -f2(42, "hello", true, ...t0); -f2(ns[0], ns[1], true); -f2(...ns, true); // FIXME: Error, since ...ns is considered as string|number here - -declare function f10(...args: T): T; - -const x10 = f10(42, "hello", true); // [number, string, boolean] -const x11 = f10(42, "hello"); // [number, string] -const x12 = f10(42); // [number] -const x13 = f10(); // [] -const x14 = f10(...t3); // [number, string, boolean] -const x15 = f10(42, ...t2); // [number, string, boolean] -const x16 = f10(42, "hello", ...t1); // [number, string, boolean] -const x17 = f10(42, "hello", true, ...t0); // [number, string, boolean] -const x18 = f10(...ns, true); // (string | number | boolean)[] - -function g10(u: U, v: V) { - let x1 = f10(...u); // U - let x2 = f10(...v); // V - let x3 = f10(1, ...u); // [number, ...string[]] - let x4 = f10(...u, ...v); // (string | number)[] -} - -declare function f11(...args: T): T; - -const z10 = f11(42, "hello", true); // [42, "hello", true] -const z11 = f11(42, "hello"); // [42, "hello"] -const z12 = f11(42); // [42] -const z13 = f11(); // [] -const z14 = f11(...t3); // [number, string, boolean] -const z15 = f11(42, ...t2); // [42, string, boolean] -const z16 = f11(42, "hello", ...t1); // [42, "hello", boolean] -const z17 = f11(42, "hello", true, ...t0); // [42, "hello", true] -const z18 = f11(...ns, true); // (string | number | true)[] - -function g11(u: U, v: V) { - let x1 = f11(...u); // U - let x2 = f11(...v); // V - let x3 = f11(1, ...u); // [1, ...string[]] - let x4 = f11(...u, ...v); // (string | number)[] -} - -function call(f: (...args: T) => U, ...args: T) { - return f(...args); -} - -function callr(args: T, f: (...args: T) => U) { - return f(...args); -} - -declare function f15(a: string, b: number): string | number; -declare function f16(a: A, b: B): A | B; - -let x20 = call((x, y) => x + y, 10, 20); // number -let x21 = call((x, y) => x + y, 10, "hello"); // string -let x22 = call(f15, "hello", 42); // string | number -let x23 = call(f16, "hello", 42); // unknown -let x24 = call<[string, number], string | number>(f16, "hello", 42); // string | number - -let x30 = callr(sn, (x, y) => x + y); // string -let x31 = callr(sn, f15); // string | number -let x32 = callr(sn, f16); // string | number - function bind(f: (x: T, ...rest: U) => V, x: T) { return (...rest: U) => f(x, ...rest); -} - -declare const f20: (x: number, y: string, z: boolean) => string[]; - -const f21 = bind(f20, 42); // (y: string, z: boolean) => string[] -const f22 = bind(f21, "hello"); // (z: boolean) => string[] -const f23 = bind(f22, true); // () => string[] - -f20(42, "hello", true); -f21("hello", true); -f22(true); -f23(); - -declare const g20: (x: number, y?: string, z?: boolean) => string[]; - -const g21 = bind(g20, 42); // (y: string, z: boolean) => string[] -const g22 = bind(g21, "hello"); // (z: boolean) => string[] -const g23 = bind(g22, true); // () => string[] - -g20(42, "hello", true); -g20(42, "hello"); -g20(42); -g21("hello", true); -g21("hello"); -g21(); -g22(true); -g22(); -g23(); - -declare function f30 any)[]>(x: T, ...args: U): U; - -const c30 = f30(42, x => "" + x, x => x + 1); // [(x: number) => string, (x: number) => number] - -type T01 = Parameters<(x: number, y: string, z: boolean) => void>; -type T02 = Parameters<(...args: [number, string, boolean]) => void>; -type T03 = ConstructorParameters void>; -type T04 = ConstructorParameters void>; -type T05 = Parameters<(...args: T[]) => void>; -type T06 = ConstructorParameters void>; -type T07 = Parameters<(...args: T) => void>; -type T08 = ConstructorParameters void>; -type T09 = Parameters; - -type Record1 = { - move: [number, 'left' | 'right']; - jump: [number, 'up' | 'down']; - stop: string; - done: []; -} - -type EventType = { - emit(e: K, ...payload: T[K] extends any[] ? T[K] : [T[K]]): void; -} - -declare var events: EventType; -events.emit('move', 10, 'left'); -events.emit('jump', 20, 'up'); -events.emit('stop', 'Bye!'); -events.emit('done'); - -// Repro from #25871 - -declare var ff1: (... args: any[]) => void; - -declare var ff2: () => void; -declare var ff3: (...args: []) => void; -declare var ff4: (a: never) => void; - -ff1 = ff2; -ff1 = ff3; -ff1 = ff4; // Error - +} //// [genericRestParameters1.js] "use strict"; @@ -174,72 +12,6 @@ var __spreadArrays = (this && this.__spreadArrays) || function () { r[k] = a[j]; return r; }; -f1 = f2; -f2 = f1; -f1(42, "hello", true); -f1(t3[0], t3[1], t3[2]); -f1.apply(void 0, t3); -f1.apply(void 0, __spreadArrays([42], t2)); -f1.apply(void 0, __spreadArrays([42, "hello"], t1)); -f1.apply(void 0, __spreadArrays([42, "hello", true], t0)); -f1(ns[0], ns[1], true); -f1.apply(void 0, __spreadArrays(ns, [true])); // FIXME: Error, since ...ns is considered as string|number here -f2(42, "hello", true); -f2(t3[0], t3[1], t3[2]); -f2.apply(void 0, t3); -f2.apply(void 0, __spreadArrays([42], t2)); -f2.apply(void 0, __spreadArrays([42, "hello"], t1)); -f2.apply(void 0, __spreadArrays([42, "hello", true], t0)); -f2(ns[0], ns[1], true); -f2.apply(void 0, __spreadArrays(ns, [true])); // FIXME: Error, since ...ns is considered as string|number here -var x10 = f10(42, "hello", true); // [number, string, boolean] -var x11 = f10(42, "hello"); // [number, string] -var x12 = f10(42); // [number] -var x13 = f10(); // [] -var x14 = f10.apply(void 0, t3); // [number, string, boolean] -var x15 = f10.apply(void 0, __spreadArrays([42], t2)); // [number, string, boolean] -var x16 = f10.apply(void 0, __spreadArrays([42, "hello"], t1)); // [number, string, boolean] -var x17 = f10.apply(void 0, __spreadArrays([42, "hello", true], t0)); // [number, string, boolean] -var x18 = f10.apply(void 0, __spreadArrays(ns, [true])); // (string | number | boolean)[] -function g10(u, v) { - var x1 = f10.apply(void 0, u); // U - var x2 = f10.apply(void 0, v); // V - var x3 = f10.apply(void 0, __spreadArrays([1], u)); // [number, ...string[]] - var x4 = f10.apply(void 0, __spreadArrays(u, v)); // (string | number)[] -} -var z10 = f11(42, "hello", true); // [42, "hello", true] -var z11 = f11(42, "hello"); // [42, "hello"] -var z12 = f11(42); // [42] -var z13 = f11(); // [] -var z14 = f11.apply(void 0, t3); // [number, string, boolean] -var z15 = f11.apply(void 0, __spreadArrays([42], t2)); // [42, string, boolean] -var z16 = f11.apply(void 0, __spreadArrays([42, "hello"], t1)); // [42, "hello", boolean] -var z17 = f11.apply(void 0, __spreadArrays([42, "hello", true], t0)); // [42, "hello", true] -var z18 = f11.apply(void 0, __spreadArrays(ns, [true])); // (string | number | true)[] -function g11(u, v) { - var x1 = f11.apply(void 0, u); // U - var x2 = f11.apply(void 0, v); // V - var x3 = f11.apply(void 0, __spreadArrays([1], u)); // [1, ...string[]] - var x4 = f11.apply(void 0, __spreadArrays(u, v)); // (string | number)[] -} -function call(f) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - return f.apply(void 0, args); -} -function callr(args, f) { - return f.apply(void 0, args); -} -var x20 = call(function (x, y) { return x + y; }, 10, 20); // number -var x21 = call(function (x, y) { return x + y; }, 10, "hello"); // string -var x22 = call(f15, "hello", 42); // string | number -var x23 = call(f16, "hello", 42); // unknown -var x24 = call(f16, "hello", 42); // string | number -var x30 = callr(sn, function (x, y) { return x + y; }); // string -var x31 = callr(sn, f15); // string | number -var x32 = callr(sn, f16); // string | number function bind(f, x) { return function () { var rest = []; @@ -249,109 +21,7 @@ function bind(f, x) { return f.apply(void 0, __spreadArrays([x], rest)); }; } -var f21 = bind(f20, 42); // (y: string, z: boolean) => string[] -var f22 = bind(f21, "hello"); // (z: boolean) => string[] -var f23 = bind(f22, true); // () => string[] -f20(42, "hello", true); -f21("hello", true); -f22(true); -f23(); -var g21 = bind(g20, 42); // (y: string, z: boolean) => string[] -var g22 = bind(g21, "hello"); // (z: boolean) => string[] -var g23 = bind(g22, true); // () => string[] -g20(42, "hello", true); -g20(42, "hello"); -g20(42); -g21("hello", true); -g21("hello"); -g21(); -g22(true); -g22(); -g23(); -var c30 = f30(42, function (x) { return "" + x; }, function (x) { return x + 1; }); // [(x: number) => string, (x: number) => number] -events.emit('move', 10, 'left'); -events.emit('jump', 20, 'up'); -events.emit('stop', 'Bye!'); -events.emit('done'); -ff1 = ff2; -ff1 = ff3; -ff1 = ff4; // Error //// [genericRestParameters1.d.ts] -declare let f1: (...x: [number, string, boolean]) => void; -declare let f2: (x0: number, x1: string, x2: boolean) => void; -declare const t3: [number, string, boolean]; -declare const t2: [string, boolean]; -declare const t1: [boolean]; -declare const t0: []; -declare const ns: [number, string]; -declare const sn: [string, number]; -declare function f10(...args: T): T; -declare const x10: [number, string, boolean]; -declare const x11: [number, string]; -declare const x12: [number]; -declare const x13: []; -declare const x14: [number, string, boolean]; -declare const x15: [number, string, boolean]; -declare const x16: [number, string, boolean]; -declare const x17: [number, string, boolean]; -declare const x18: (string | number | boolean)[]; -declare function g10(u: U, v: V): void; -declare function f11(...args: T): T; -declare const z10: [42, "hello", true]; -declare const z11: [42, "hello"]; -declare const z12: [42]; -declare const z13: []; -declare const z14: [number, string, boolean]; -declare const z15: [42, string, boolean]; -declare const z16: [42, "hello", boolean]; -declare const z17: [42, "hello", true]; -declare const z18: (string | number | true)[]; -declare function g11(u: U, v: V): void; -declare function call(f: (...args: T) => U, ...args: T): U; -declare function callr(args: T, f: (...args: T) => U): U; -declare function f15(a: string, b: number): string | number; -declare function f16(a: A, b: B): A | B; -declare let x20: number; -declare let x21: string; -declare let x22: string | number; -declare let x23: string | number; -declare let x24: string | number; -declare let x30: string; -declare let x31: string | number; -declare let x32: string | number; declare function bind(f: (x: T, ...rest: U) => V, x: T): (...rest: U) => V; -declare const f20: (x: number, y: string, z: boolean) => string[]; -declare const f21: (y: string, z: boolean) => string[]; -declare const f22: (z: boolean) => string[]; -declare const f23: () => string[]; -declare const g20: (x: number, y?: string, z?: boolean) => string[]; -declare const g21: (y?: string | undefined, z?: boolean | undefined) => string[]; -declare const g22: (z?: boolean | undefined) => string[]; -declare const g23: () => string[]; -declare function f30 any)[]>(x: T, ...args: U): U; -declare const c30: [(x: number) => string, (x: number) => number]; -declare type T01 = Parameters<(x: number, y: string, z: boolean) => void>; -declare type T02 = Parameters<(...args: [number, string, boolean]) => void>; -declare type T03 = ConstructorParameters void>; -declare type T04 = ConstructorParameters void>; -declare type T05 = Parameters<(...args: T[]) => void>; -declare type T06 = ConstructorParameters void>; -declare type T07 = Parameters<(...args: T) => void>; -declare type T08 = ConstructorParameters void>; -declare type T09 = Parameters; -declare type Record1 = { - move: [number, 'left' | 'right']; - jump: [number, 'up' | 'down']; - stop: string; - done: []; -}; -declare type EventType = { - emit(e: K, ...payload: T[K] extends any[] ? T[K] : [T[K]]): void; -}; -declare var events: EventType; -declare var ff1: (...args: any[]) => void; -declare var ff2: () => void; -declare var ff3: (...args: []) => void; -declare var ff4: (a: never) => void; diff --git a/tests/baselines/reference/genericRestParameters1.symbols b/tests/baselines/reference/genericRestParameters1.symbols index 56f1bc6cf5869..7e4e3f262f1b0 100644 --- a/tests/baselines/reference/genericRestParameters1.symbols +++ b/tests/baselines/reference/genericRestParameters1.symbols @@ -1,642 +1,22 @@ === tests/cases/conformance/types/rest/genericRestParameters1.ts === -declare let f1: (...x: [number, string, boolean]) => void; ->f1 : Symbol(f1, Decl(genericRestParameters1.ts, 0, 11)) ->x : Symbol(x, Decl(genericRestParameters1.ts, 0, 17)) - -declare let f2: (x0: number, x1: string, x2: boolean) => void; ->f2 : Symbol(f2, Decl(genericRestParameters1.ts, 1, 11)) ->x0 : Symbol(x0, Decl(genericRestParameters1.ts, 1, 17)) ->x1 : Symbol(x1, Decl(genericRestParameters1.ts, 1, 28)) ->x2 : Symbol(x2, Decl(genericRestParameters1.ts, 1, 40)) - -f1 = f2; ->f1 : Symbol(f1, Decl(genericRestParameters1.ts, 0, 11)) ->f2 : Symbol(f2, Decl(genericRestParameters1.ts, 1, 11)) - -f2 = f1; ->f2 : Symbol(f2, Decl(genericRestParameters1.ts, 1, 11)) ->f1 : Symbol(f1, Decl(genericRestParameters1.ts, 0, 11)) - -declare const t3: [number, string, boolean]; ->t3 : Symbol(t3, Decl(genericRestParameters1.ts, 6, 13)) - -declare const t2: [string, boolean]; ->t2 : Symbol(t2, Decl(genericRestParameters1.ts, 7, 13)) - -declare const t1: [boolean]; ->t1 : Symbol(t1, Decl(genericRestParameters1.ts, 8, 13)) - -declare const t0: []; ->t0 : Symbol(t0, Decl(genericRestParameters1.ts, 9, 13)) - -declare const ns: [number, string]; ->ns : Symbol(ns, Decl(genericRestParameters1.ts, 11, 13)) - -declare const sn: [string, number]; ->sn : Symbol(sn, Decl(genericRestParameters1.ts, 12, 13)) - -f1(42, "hello", true); ->f1 : Symbol(f1, Decl(genericRestParameters1.ts, 0, 11)) - -f1(t3[0], t3[1], t3[2]); ->f1 : Symbol(f1, Decl(genericRestParameters1.ts, 0, 11)) ->t3 : Symbol(t3, Decl(genericRestParameters1.ts, 6, 13)) ->0 : Symbol(0) ->t3 : Symbol(t3, Decl(genericRestParameters1.ts, 6, 13)) ->1 : Symbol(1) ->t3 : Symbol(t3, Decl(genericRestParameters1.ts, 6, 13)) ->2 : Symbol(2) - -f1(...t3); ->f1 : Symbol(f1, Decl(genericRestParameters1.ts, 0, 11)) ->t3 : Symbol(t3, Decl(genericRestParameters1.ts, 6, 13)) - -f1(42, ...t2); ->f1 : Symbol(f1, Decl(genericRestParameters1.ts, 0, 11)) ->t2 : Symbol(t2, Decl(genericRestParameters1.ts, 7, 13)) - -f1(42, "hello", ...t1); ->f1 : Symbol(f1, Decl(genericRestParameters1.ts, 0, 11)) ->t1 : Symbol(t1, Decl(genericRestParameters1.ts, 8, 13)) - -f1(42, "hello", true, ...t0); ->f1 : Symbol(f1, Decl(genericRestParameters1.ts, 0, 11)) ->t0 : Symbol(t0, Decl(genericRestParameters1.ts, 9, 13)) - -f1(ns[0], ns[1], true); ->f1 : Symbol(f1, Decl(genericRestParameters1.ts, 0, 11)) ->ns : Symbol(ns, Decl(genericRestParameters1.ts, 11, 13)) ->0 : Symbol(0) ->ns : Symbol(ns, Decl(genericRestParameters1.ts, 11, 13)) ->1 : Symbol(1) - -f1(...ns, true); // FIXME: Error, since ...ns is considered as string|number here ->f1 : Symbol(f1, Decl(genericRestParameters1.ts, 0, 11)) ->ns : Symbol(ns, Decl(genericRestParameters1.ts, 11, 13)) - -f2(42, "hello", true); ->f2 : Symbol(f2, Decl(genericRestParameters1.ts, 1, 11)) - -f2(t3[0], t3[1], t3[2]); ->f2 : Symbol(f2, Decl(genericRestParameters1.ts, 1, 11)) ->t3 : Symbol(t3, Decl(genericRestParameters1.ts, 6, 13)) ->0 : Symbol(0) ->t3 : Symbol(t3, Decl(genericRestParameters1.ts, 6, 13)) ->1 : Symbol(1) ->t3 : Symbol(t3, Decl(genericRestParameters1.ts, 6, 13)) ->2 : Symbol(2) - -f2(...t3); ->f2 : Symbol(f2, Decl(genericRestParameters1.ts, 1, 11)) ->t3 : Symbol(t3, Decl(genericRestParameters1.ts, 6, 13)) - -f2(42, ...t2); ->f2 : Symbol(f2, Decl(genericRestParameters1.ts, 1, 11)) ->t2 : Symbol(t2, Decl(genericRestParameters1.ts, 7, 13)) - -f2(42, "hello", ...t1); ->f2 : Symbol(f2, Decl(genericRestParameters1.ts, 1, 11)) ->t1 : Symbol(t1, Decl(genericRestParameters1.ts, 8, 13)) - -f2(42, "hello", true, ...t0); ->f2 : Symbol(f2, Decl(genericRestParameters1.ts, 1, 11)) ->t0 : Symbol(t0, Decl(genericRestParameters1.ts, 9, 13)) - -f2(ns[0], ns[1], true); ->f2 : Symbol(f2, Decl(genericRestParameters1.ts, 1, 11)) ->ns : Symbol(ns, Decl(genericRestParameters1.ts, 11, 13)) ->0 : Symbol(0) ->ns : Symbol(ns, Decl(genericRestParameters1.ts, 11, 13)) ->1 : Symbol(1) - -f2(...ns, true); // FIXME: Error, since ...ns is considered as string|number here ->f2 : Symbol(f2, Decl(genericRestParameters1.ts, 1, 11)) ->ns : Symbol(ns, Decl(genericRestParameters1.ts, 11, 13)) - -declare function f10(...args: T): T; ->f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 32, 21)) ->args : Symbol(args, Decl(genericRestParameters1.ts, 32, 42)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 32, 21)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 32, 21)) - -const x10 = f10(42, "hello", true); // [number, string, boolean] ->x10 : Symbol(x10, Decl(genericRestParameters1.ts, 34, 5)) ->f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) - -const x11 = f10(42, "hello"); // [number, string] ->x11 : Symbol(x11, Decl(genericRestParameters1.ts, 35, 5)) ->f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) - -const x12 = f10(42); // [number] ->x12 : Symbol(x12, Decl(genericRestParameters1.ts, 36, 5)) ->f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) - -const x13 = f10(); // [] ->x13 : Symbol(x13, Decl(genericRestParameters1.ts, 37, 5)) ->f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) - -const x14 = f10(...t3); // [number, string, boolean] ->x14 : Symbol(x14, Decl(genericRestParameters1.ts, 38, 5)) ->f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) ->t3 : Symbol(t3, Decl(genericRestParameters1.ts, 6, 13)) - -const x15 = f10(42, ...t2); // [number, string, boolean] ->x15 : Symbol(x15, Decl(genericRestParameters1.ts, 39, 5)) ->f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) ->t2 : Symbol(t2, Decl(genericRestParameters1.ts, 7, 13)) - -const x16 = f10(42, "hello", ...t1); // [number, string, boolean] ->x16 : Symbol(x16, Decl(genericRestParameters1.ts, 40, 5)) ->f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) ->t1 : Symbol(t1, Decl(genericRestParameters1.ts, 8, 13)) - -const x17 = f10(42, "hello", true, ...t0); // [number, string, boolean] ->x17 : Symbol(x17, Decl(genericRestParameters1.ts, 41, 5)) ->f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) ->t0 : Symbol(t0, Decl(genericRestParameters1.ts, 9, 13)) - -const x18 = f10(...ns, true); // (string | number | boolean)[] ->x18 : Symbol(x18, Decl(genericRestParameters1.ts, 42, 5)) ->f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) ->ns : Symbol(ns, Decl(genericRestParameters1.ts, 11, 13)) - -function g10(u: U, v: V) { ->g10 : Symbol(g10, Decl(genericRestParameters1.ts, 42, 29)) ->U : Symbol(U, Decl(genericRestParameters1.ts, 44, 13)) ->V : Symbol(V, Decl(genericRestParameters1.ts, 44, 32)) ->u : Symbol(u, Decl(genericRestParameters1.ts, 44, 61)) ->U : Symbol(U, Decl(genericRestParameters1.ts, 44, 13)) ->v : Symbol(v, Decl(genericRestParameters1.ts, 44, 66)) ->V : Symbol(V, Decl(genericRestParameters1.ts, 44, 32)) - - let x1 = f10(...u); // U ->x1 : Symbol(x1, Decl(genericRestParameters1.ts, 45, 7)) ->f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) ->u : Symbol(u, Decl(genericRestParameters1.ts, 44, 61)) - - let x2 = f10(...v); // V ->x2 : Symbol(x2, Decl(genericRestParameters1.ts, 46, 7)) ->f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) ->v : Symbol(v, Decl(genericRestParameters1.ts, 44, 66)) - - let x3 = f10(1, ...u); // [number, ...string[]] ->x3 : Symbol(x3, Decl(genericRestParameters1.ts, 47, 7)) ->f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) ->u : Symbol(u, Decl(genericRestParameters1.ts, 44, 61)) - - let x4 = f10(...u, ...v); // (string | number)[] ->x4 : Symbol(x4, Decl(genericRestParameters1.ts, 48, 7)) ->f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) ->u : Symbol(u, Decl(genericRestParameters1.ts, 44, 61)) ->v : Symbol(v, Decl(genericRestParameters1.ts, 44, 66)) -} - -declare function f11(...args: T): T; ->f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 51, 21)) ->args : Symbol(args, Decl(genericRestParameters1.ts, 51, 62)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 51, 21)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 51, 21)) - -const z10 = f11(42, "hello", true); // [42, "hello", true] ->z10 : Symbol(z10, Decl(genericRestParameters1.ts, 53, 5)) ->f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) - -const z11 = f11(42, "hello"); // [42, "hello"] ->z11 : Symbol(z11, Decl(genericRestParameters1.ts, 54, 5)) ->f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) - -const z12 = f11(42); // [42] ->z12 : Symbol(z12, Decl(genericRestParameters1.ts, 55, 5)) ->f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) - -const z13 = f11(); // [] ->z13 : Symbol(z13, Decl(genericRestParameters1.ts, 56, 5)) ->f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) - -const z14 = f11(...t3); // [number, string, boolean] ->z14 : Symbol(z14, Decl(genericRestParameters1.ts, 57, 5)) ->f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) ->t3 : Symbol(t3, Decl(genericRestParameters1.ts, 6, 13)) - -const z15 = f11(42, ...t2); // [42, string, boolean] ->z15 : Symbol(z15, Decl(genericRestParameters1.ts, 58, 5)) ->f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) ->t2 : Symbol(t2, Decl(genericRestParameters1.ts, 7, 13)) - -const z16 = f11(42, "hello", ...t1); // [42, "hello", boolean] ->z16 : Symbol(z16, Decl(genericRestParameters1.ts, 59, 5)) ->f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) ->t1 : Symbol(t1, Decl(genericRestParameters1.ts, 8, 13)) - -const z17 = f11(42, "hello", true, ...t0); // [42, "hello", true] ->z17 : Symbol(z17, Decl(genericRestParameters1.ts, 60, 5)) ->f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) ->t0 : Symbol(t0, Decl(genericRestParameters1.ts, 9, 13)) - -const z18 = f11(...ns, true); // (string | number | true)[] ->z18 : Symbol(z18, Decl(genericRestParameters1.ts, 61, 5)) ->f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) ->ns : Symbol(ns, Decl(genericRestParameters1.ts, 11, 13)) - -function g11(u: U, v: V) { ->g11 : Symbol(g11, Decl(genericRestParameters1.ts, 61, 29)) ->U : Symbol(U, Decl(genericRestParameters1.ts, 63, 13)) ->V : Symbol(V, Decl(genericRestParameters1.ts, 63, 32)) ->u : Symbol(u, Decl(genericRestParameters1.ts, 63, 61)) ->U : Symbol(U, Decl(genericRestParameters1.ts, 63, 13)) ->v : Symbol(v, Decl(genericRestParameters1.ts, 63, 66)) ->V : Symbol(V, Decl(genericRestParameters1.ts, 63, 32)) - - let x1 = f11(...u); // U ->x1 : Symbol(x1, Decl(genericRestParameters1.ts, 64, 7)) ->f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) ->u : Symbol(u, Decl(genericRestParameters1.ts, 63, 61)) - - let x2 = f11(...v); // V ->x2 : Symbol(x2, Decl(genericRestParameters1.ts, 65, 7)) ->f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) ->v : Symbol(v, Decl(genericRestParameters1.ts, 63, 66)) - - let x3 = f11(1, ...u); // [1, ...string[]] ->x3 : Symbol(x3, Decl(genericRestParameters1.ts, 66, 7)) ->f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) ->u : Symbol(u, Decl(genericRestParameters1.ts, 63, 61)) - - let x4 = f11(...u, ...v); // (string | number)[] ->x4 : Symbol(x4, Decl(genericRestParameters1.ts, 67, 7)) ->f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) ->u : Symbol(u, Decl(genericRestParameters1.ts, 63, 61)) ->v : Symbol(v, Decl(genericRestParameters1.ts, 63, 66)) -} - -function call(f: (...args: T) => U, ...args: T) { ->call : Symbol(call, Decl(genericRestParameters1.ts, 68, 1)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 70, 14)) ->U : Symbol(U, Decl(genericRestParameters1.ts, 70, 34)) ->f : Symbol(f, Decl(genericRestParameters1.ts, 70, 38)) ->args : Symbol(args, Decl(genericRestParameters1.ts, 70, 42)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 70, 14)) ->U : Symbol(U, Decl(genericRestParameters1.ts, 70, 34)) ->args : Symbol(args, Decl(genericRestParameters1.ts, 70, 59)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 70, 14)) - - return f(...args); ->f : Symbol(f, Decl(genericRestParameters1.ts, 70, 38)) ->args : Symbol(args, Decl(genericRestParameters1.ts, 70, 59)) -} - -function callr(args: T, f: (...args: T) => U) { ->callr : Symbol(callr, Decl(genericRestParameters1.ts, 72, 1)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 74, 15)) ->U : Symbol(U, Decl(genericRestParameters1.ts, 74, 35)) ->args : Symbol(args, Decl(genericRestParameters1.ts, 74, 39)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 74, 15)) ->f : Symbol(f, Decl(genericRestParameters1.ts, 74, 47)) ->args : Symbol(args, Decl(genericRestParameters1.ts, 74, 52)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 74, 15)) ->U : Symbol(U, Decl(genericRestParameters1.ts, 74, 35)) - - return f(...args); ->f : Symbol(f, Decl(genericRestParameters1.ts, 74, 47)) ->args : Symbol(args, Decl(genericRestParameters1.ts, 74, 39)) -} - -declare function f15(a: string, b: number): string | number; ->f15 : Symbol(f15, Decl(genericRestParameters1.ts, 76, 1)) ->a : Symbol(a, Decl(genericRestParameters1.ts, 78, 21)) ->b : Symbol(b, Decl(genericRestParameters1.ts, 78, 31)) - -declare function f16(a: A, b: B): A | B; ->f16 : Symbol(f16, Decl(genericRestParameters1.ts, 78, 60)) ->A : Symbol(A, Decl(genericRestParameters1.ts, 79, 21)) ->B : Symbol(B, Decl(genericRestParameters1.ts, 79, 23)) ->a : Symbol(a, Decl(genericRestParameters1.ts, 79, 27)) ->A : Symbol(A, Decl(genericRestParameters1.ts, 79, 21)) ->b : Symbol(b, Decl(genericRestParameters1.ts, 79, 32)) ->B : Symbol(B, Decl(genericRestParameters1.ts, 79, 23)) ->A : Symbol(A, Decl(genericRestParameters1.ts, 79, 21)) ->B : Symbol(B, Decl(genericRestParameters1.ts, 79, 23)) - -let x20 = call((x, y) => x + y, 10, 20); // number ->x20 : Symbol(x20, Decl(genericRestParameters1.ts, 81, 3)) ->call : Symbol(call, Decl(genericRestParameters1.ts, 68, 1)) ->x : Symbol(x, Decl(genericRestParameters1.ts, 81, 16)) ->y : Symbol(y, Decl(genericRestParameters1.ts, 81, 18)) ->x : Symbol(x, Decl(genericRestParameters1.ts, 81, 16)) ->y : Symbol(y, Decl(genericRestParameters1.ts, 81, 18)) - -let x21 = call((x, y) => x + y, 10, "hello"); // string ->x21 : Symbol(x21, Decl(genericRestParameters1.ts, 82, 3)) ->call : Symbol(call, Decl(genericRestParameters1.ts, 68, 1)) ->x : Symbol(x, Decl(genericRestParameters1.ts, 82, 16)) ->y : Symbol(y, Decl(genericRestParameters1.ts, 82, 18)) ->x : Symbol(x, Decl(genericRestParameters1.ts, 82, 16)) ->y : Symbol(y, Decl(genericRestParameters1.ts, 82, 18)) - -let x22 = call(f15, "hello", 42); // string | number ->x22 : Symbol(x22, Decl(genericRestParameters1.ts, 83, 3)) ->call : Symbol(call, Decl(genericRestParameters1.ts, 68, 1)) ->f15 : Symbol(f15, Decl(genericRestParameters1.ts, 76, 1)) - -let x23 = call(f16, "hello", 42); // unknown ->x23 : Symbol(x23, Decl(genericRestParameters1.ts, 84, 3)) ->call : Symbol(call, Decl(genericRestParameters1.ts, 68, 1)) ->f16 : Symbol(f16, Decl(genericRestParameters1.ts, 78, 60)) - -let x24 = call<[string, number], string | number>(f16, "hello", 42); // string | number ->x24 : Symbol(x24, Decl(genericRestParameters1.ts, 85, 3)) ->call : Symbol(call, Decl(genericRestParameters1.ts, 68, 1)) ->f16 : Symbol(f16, Decl(genericRestParameters1.ts, 78, 60)) - -let x30 = callr(sn, (x, y) => x + y); // string ->x30 : Symbol(x30, Decl(genericRestParameters1.ts, 87, 3)) ->callr : Symbol(callr, Decl(genericRestParameters1.ts, 72, 1)) ->sn : Symbol(sn, Decl(genericRestParameters1.ts, 12, 13)) ->x : Symbol(x, Decl(genericRestParameters1.ts, 87, 21)) ->y : Symbol(y, Decl(genericRestParameters1.ts, 87, 23)) ->x : Symbol(x, Decl(genericRestParameters1.ts, 87, 21)) ->y : Symbol(y, Decl(genericRestParameters1.ts, 87, 23)) - -let x31 = callr(sn, f15); // string | number ->x31 : Symbol(x31, Decl(genericRestParameters1.ts, 88, 3)) ->callr : Symbol(callr, Decl(genericRestParameters1.ts, 72, 1)) ->sn : Symbol(sn, Decl(genericRestParameters1.ts, 12, 13)) ->f15 : Symbol(f15, Decl(genericRestParameters1.ts, 76, 1)) - -let x32 = callr(sn, f16); // string | number ->x32 : Symbol(x32, Decl(genericRestParameters1.ts, 89, 3)) ->callr : Symbol(callr, Decl(genericRestParameters1.ts, 72, 1)) ->sn : Symbol(sn, Decl(genericRestParameters1.ts, 12, 13)) ->f16 : Symbol(f16, Decl(genericRestParameters1.ts, 78, 60)) - function bind(f: (x: T, ...rest: U) => V, x: T) { ->bind : Symbol(bind, Decl(genericRestParameters1.ts, 89, 25)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 91, 14)) ->U : Symbol(U, Decl(genericRestParameters1.ts, 91, 16)) ->V : Symbol(V, Decl(genericRestParameters1.ts, 91, 37)) ->f : Symbol(f, Decl(genericRestParameters1.ts, 91, 41)) ->x : Symbol(x, Decl(genericRestParameters1.ts, 91, 45)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 91, 14)) ->rest : Symbol(rest, Decl(genericRestParameters1.ts, 91, 50)) ->U : Symbol(U, Decl(genericRestParameters1.ts, 91, 16)) ->V : Symbol(V, Decl(genericRestParameters1.ts, 91, 37)) ->x : Symbol(x, Decl(genericRestParameters1.ts, 91, 68)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 91, 14)) +>bind : Symbol(bind, Decl(genericRestParameters1.ts, 0, 0)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 0, 14)) +>U : Symbol(U, Decl(genericRestParameters1.ts, 0, 16)) +>V : Symbol(V, Decl(genericRestParameters1.ts, 0, 37)) +>f : Symbol(f, Decl(genericRestParameters1.ts, 0, 41)) +>x : Symbol(x, Decl(genericRestParameters1.ts, 0, 45)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 0, 14)) +>rest : Symbol(rest, Decl(genericRestParameters1.ts, 0, 50)) +>U : Symbol(U, Decl(genericRestParameters1.ts, 0, 16)) +>V : Symbol(V, Decl(genericRestParameters1.ts, 0, 37)) +>x : Symbol(x, Decl(genericRestParameters1.ts, 0, 68)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 0, 14)) return (...rest: U) => f(x, ...rest); ->rest : Symbol(rest, Decl(genericRestParameters1.ts, 92, 12)) ->U : Symbol(U, Decl(genericRestParameters1.ts, 91, 16)) ->f : Symbol(f, Decl(genericRestParameters1.ts, 91, 41)) ->x : Symbol(x, Decl(genericRestParameters1.ts, 91, 68)) ->rest : Symbol(rest, Decl(genericRestParameters1.ts, 92, 12)) -} - -declare const f20: (x: number, y: string, z: boolean) => string[]; ->f20 : Symbol(f20, Decl(genericRestParameters1.ts, 95, 13)) ->x : Symbol(x, Decl(genericRestParameters1.ts, 95, 20)) ->y : Symbol(y, Decl(genericRestParameters1.ts, 95, 30)) ->z : Symbol(z, Decl(genericRestParameters1.ts, 95, 41)) - -const f21 = bind(f20, 42); // (y: string, z: boolean) => string[] ->f21 : Symbol(f21, Decl(genericRestParameters1.ts, 97, 5)) ->bind : Symbol(bind, Decl(genericRestParameters1.ts, 89, 25)) ->f20 : Symbol(f20, Decl(genericRestParameters1.ts, 95, 13)) - -const f22 = bind(f21, "hello"); // (z: boolean) => string[] ->f22 : Symbol(f22, Decl(genericRestParameters1.ts, 98, 5)) ->bind : Symbol(bind, Decl(genericRestParameters1.ts, 89, 25)) ->f21 : Symbol(f21, Decl(genericRestParameters1.ts, 97, 5)) - -const f23 = bind(f22, true); // () => string[] ->f23 : Symbol(f23, Decl(genericRestParameters1.ts, 99, 5)) ->bind : Symbol(bind, Decl(genericRestParameters1.ts, 89, 25)) ->f22 : Symbol(f22, Decl(genericRestParameters1.ts, 98, 5)) - -f20(42, "hello", true); ->f20 : Symbol(f20, Decl(genericRestParameters1.ts, 95, 13)) - -f21("hello", true); ->f21 : Symbol(f21, Decl(genericRestParameters1.ts, 97, 5)) - -f22(true); ->f22 : Symbol(f22, Decl(genericRestParameters1.ts, 98, 5)) - -f23(); ->f23 : Symbol(f23, Decl(genericRestParameters1.ts, 99, 5)) - -declare const g20: (x: number, y?: string, z?: boolean) => string[]; ->g20 : Symbol(g20, Decl(genericRestParameters1.ts, 106, 13)) ->x : Symbol(x, Decl(genericRestParameters1.ts, 106, 20)) ->y : Symbol(y, Decl(genericRestParameters1.ts, 106, 30)) ->z : Symbol(z, Decl(genericRestParameters1.ts, 106, 42)) - -const g21 = bind(g20, 42); // (y: string, z: boolean) => string[] ->g21 : Symbol(g21, Decl(genericRestParameters1.ts, 108, 5)) ->bind : Symbol(bind, Decl(genericRestParameters1.ts, 89, 25)) ->g20 : Symbol(g20, Decl(genericRestParameters1.ts, 106, 13)) - -const g22 = bind(g21, "hello"); // (z: boolean) => string[] ->g22 : Symbol(g22, Decl(genericRestParameters1.ts, 109, 5)) ->bind : Symbol(bind, Decl(genericRestParameters1.ts, 89, 25)) ->g21 : Symbol(g21, Decl(genericRestParameters1.ts, 108, 5)) - -const g23 = bind(g22, true); // () => string[] ->g23 : Symbol(g23, Decl(genericRestParameters1.ts, 110, 5)) ->bind : Symbol(bind, Decl(genericRestParameters1.ts, 89, 25)) ->g22 : Symbol(g22, Decl(genericRestParameters1.ts, 109, 5)) - -g20(42, "hello", true); ->g20 : Symbol(g20, Decl(genericRestParameters1.ts, 106, 13)) - -g20(42, "hello"); ->g20 : Symbol(g20, Decl(genericRestParameters1.ts, 106, 13)) - -g20(42); ->g20 : Symbol(g20, Decl(genericRestParameters1.ts, 106, 13)) - -g21("hello", true); ->g21 : Symbol(g21, Decl(genericRestParameters1.ts, 108, 5)) - -g21("hello"); ->g21 : Symbol(g21, Decl(genericRestParameters1.ts, 108, 5)) - -g21(); ->g21 : Symbol(g21, Decl(genericRestParameters1.ts, 108, 5)) - -g22(true); ->g22 : Symbol(g22, Decl(genericRestParameters1.ts, 109, 5)) - -g22(); ->g22 : Symbol(g22, Decl(genericRestParameters1.ts, 109, 5)) - -g23(); ->g23 : Symbol(g23, Decl(genericRestParameters1.ts, 110, 5)) - -declare function f30 any)[]>(x: T, ...args: U): U; ->f30 : Symbol(f30, Decl(genericRestParameters1.ts, 120, 6)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 122, 21)) ->U : Symbol(U, Decl(genericRestParameters1.ts, 122, 23)) ->x : Symbol(x, Decl(genericRestParameters1.ts, 122, 36)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 122, 21)) ->x : Symbol(x, Decl(genericRestParameters1.ts, 122, 53)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 122, 21)) ->args : Symbol(args, Decl(genericRestParameters1.ts, 122, 58)) ->U : Symbol(U, Decl(genericRestParameters1.ts, 122, 23)) ->U : Symbol(U, Decl(genericRestParameters1.ts, 122, 23)) - -const c30 = f30(42, x => "" + x, x => x + 1); // [(x: number) => string, (x: number) => number] ->c30 : Symbol(c30, Decl(genericRestParameters1.ts, 124, 5)) ->f30 : Symbol(f30, Decl(genericRestParameters1.ts, 120, 6)) ->x : Symbol(x, Decl(genericRestParameters1.ts, 124, 19)) ->x : Symbol(x, Decl(genericRestParameters1.ts, 124, 19)) ->x : Symbol(x, Decl(genericRestParameters1.ts, 124, 32)) ->x : Symbol(x, Decl(genericRestParameters1.ts, 124, 32)) - -type T01 = Parameters<(x: number, y: string, z: boolean) => void>; ->T01 : Symbol(T01, Decl(genericRestParameters1.ts, 124, 45)) ->Parameters : Symbol(Parameters, Decl(lib.es5.d.ts, --, --)) ->x : Symbol(x, Decl(genericRestParameters1.ts, 126, 23)) ->y : Symbol(y, Decl(genericRestParameters1.ts, 126, 33)) ->z : Symbol(z, Decl(genericRestParameters1.ts, 126, 44)) - -type T02 = Parameters<(...args: [number, string, boolean]) => void>; ->T02 : Symbol(T02, Decl(genericRestParameters1.ts, 126, 66)) ->Parameters : Symbol(Parameters, Decl(lib.es5.d.ts, --, --)) ->args : Symbol(args, Decl(genericRestParameters1.ts, 127, 23)) - -type T03 = ConstructorParameters void>; ->T03 : Symbol(T03, Decl(genericRestParameters1.ts, 127, 68)) ->ConstructorParameters : Symbol(ConstructorParameters, Decl(lib.es5.d.ts, --, --)) ->x : Symbol(x, Decl(genericRestParameters1.ts, 128, 38)) ->y : Symbol(y, Decl(genericRestParameters1.ts, 128, 48)) ->z : Symbol(z, Decl(genericRestParameters1.ts, 128, 59)) - -type T04 = ConstructorParameters void>; ->T04 : Symbol(T04, Decl(genericRestParameters1.ts, 128, 81)) ->ConstructorParameters : Symbol(ConstructorParameters, Decl(lib.es5.d.ts, --, --)) ->args : Symbol(args, Decl(genericRestParameters1.ts, 129, 38)) - -type T05 = Parameters<(...args: T[]) => void>; ->T05 : Symbol(T05, Decl(genericRestParameters1.ts, 129, 83)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 130, 9)) ->Parameters : Symbol(Parameters, Decl(lib.es5.d.ts, --, --)) ->args : Symbol(args, Decl(genericRestParameters1.ts, 130, 26)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 130, 9)) - -type T06 = ConstructorParameters void>; ->T06 : Symbol(T06, Decl(genericRestParameters1.ts, 130, 49)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 131, 9)) ->ConstructorParameters : Symbol(ConstructorParameters, Decl(lib.es5.d.ts, --, --)) ->args : Symbol(args, Decl(genericRestParameters1.ts, 131, 41)) - -type T07 = Parameters<(...args: T) => void>; ->T07 : Symbol(T07, Decl(genericRestParameters1.ts, 131, 63)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 132, 9)) ->Parameters : Symbol(Parameters, Decl(lib.es5.d.ts, --, --)) ->args : Symbol(args, Decl(genericRestParameters1.ts, 132, 40)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 132, 9)) - -type T08 = ConstructorParameters void>; ->T08 : Symbol(T08, Decl(genericRestParameters1.ts, 132, 61)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 133, 9)) ->ConstructorParameters : Symbol(ConstructorParameters, Decl(lib.es5.d.ts, --, --)) ->args : Symbol(args, Decl(genericRestParameters1.ts, 133, 55)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 133, 9)) - -type T09 = Parameters; ->T09 : Symbol(T09, Decl(genericRestParameters1.ts, 133, 76)) ->Parameters : Symbol(Parameters, Decl(lib.es5.d.ts, --, --)) ->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) - -type Record1 = { ->Record1 : Symbol(Record1, Decl(genericRestParameters1.ts, 134, 32)) - - move: [number, 'left' | 'right']; ->move : Symbol(move, Decl(genericRestParameters1.ts, 136, 16)) - - jump: [number, 'up' | 'down']; ->jump : Symbol(jump, Decl(genericRestParameters1.ts, 137, 35)) - - stop: string; ->stop : Symbol(stop, Decl(genericRestParameters1.ts, 138, 32)) - - done: []; ->done : Symbol(done, Decl(genericRestParameters1.ts, 139, 15)) -} - -type EventType = { ->EventType : Symbol(EventType, Decl(genericRestParameters1.ts, 141, 1)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 143, 15)) - - emit(e: K, ...payload: T[K] extends any[] ? T[K] : [T[K]]): void; ->emit : Symbol(emit, Decl(genericRestParameters1.ts, 143, 21)) ->K : Symbol(K, Decl(genericRestParameters1.ts, 144, 7)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 143, 15)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 143, 15)) ->e : Symbol(e, Decl(genericRestParameters1.ts, 144, 36)) ->K : Symbol(K, Decl(genericRestParameters1.ts, 144, 7)) ->payload : Symbol(payload, Decl(genericRestParameters1.ts, 144, 41)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 143, 15)) ->K : Symbol(K, Decl(genericRestParameters1.ts, 144, 7)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 143, 15)) ->K : Symbol(K, Decl(genericRestParameters1.ts, 144, 7)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 143, 15)) ->K : Symbol(K, Decl(genericRestParameters1.ts, 144, 7)) +>rest : Symbol(rest, Decl(genericRestParameters1.ts, 1, 12)) +>U : Symbol(U, Decl(genericRestParameters1.ts, 0, 16)) +>f : Symbol(f, Decl(genericRestParameters1.ts, 0, 41)) +>x : Symbol(x, Decl(genericRestParameters1.ts, 0, 68)) +>rest : Symbol(rest, Decl(genericRestParameters1.ts, 1, 12)) } - -declare var events: EventType; ->events : Symbol(events, Decl(genericRestParameters1.ts, 147, 11)) ->EventType : Symbol(EventType, Decl(genericRestParameters1.ts, 141, 1)) ->Record1 : Symbol(Record1, Decl(genericRestParameters1.ts, 134, 32)) - -events.emit('move', 10, 'left'); ->events.emit : Symbol(emit, Decl(genericRestParameters1.ts, 143, 21)) ->events : Symbol(events, Decl(genericRestParameters1.ts, 147, 11)) ->emit : Symbol(emit, Decl(genericRestParameters1.ts, 143, 21)) - -events.emit('jump', 20, 'up'); ->events.emit : Symbol(emit, Decl(genericRestParameters1.ts, 143, 21)) ->events : Symbol(events, Decl(genericRestParameters1.ts, 147, 11)) ->emit : Symbol(emit, Decl(genericRestParameters1.ts, 143, 21)) - -events.emit('stop', 'Bye!'); ->events.emit : Symbol(emit, Decl(genericRestParameters1.ts, 143, 21)) ->events : Symbol(events, Decl(genericRestParameters1.ts, 147, 11)) ->emit : Symbol(emit, Decl(genericRestParameters1.ts, 143, 21)) - -events.emit('done'); ->events.emit : Symbol(emit, Decl(genericRestParameters1.ts, 143, 21)) ->events : Symbol(events, Decl(genericRestParameters1.ts, 147, 11)) ->emit : Symbol(emit, Decl(genericRestParameters1.ts, 143, 21)) - -// Repro from #25871 - -declare var ff1: (... args: any[]) => void; ->ff1 : Symbol(ff1, Decl(genericRestParameters1.ts, 155, 11)) ->args : Symbol(args, Decl(genericRestParameters1.ts, 155, 18)) - -declare var ff2: () => void; ->ff2 : Symbol(ff2, Decl(genericRestParameters1.ts, 157, 11)) - -declare var ff3: (...args: []) => void; ->ff3 : Symbol(ff3, Decl(genericRestParameters1.ts, 158, 11)) ->args : Symbol(args, Decl(genericRestParameters1.ts, 158, 18)) - -declare var ff4: (a: never) => void; ->ff4 : Symbol(ff4, Decl(genericRestParameters1.ts, 159, 11)) ->a : Symbol(a, Decl(genericRestParameters1.ts, 159, 18)) - -ff1 = ff2; ->ff1 : Symbol(ff1, Decl(genericRestParameters1.ts, 155, 11)) ->ff2 : Symbol(ff2, Decl(genericRestParameters1.ts, 157, 11)) - -ff1 = ff3; ->ff1 : Symbol(ff1, Decl(genericRestParameters1.ts, 155, 11)) ->ff3 : Symbol(ff3, Decl(genericRestParameters1.ts, 158, 11)) - -ff1 = ff4; // Error ->ff1 : Symbol(ff1, Decl(genericRestParameters1.ts, 155, 11)) ->ff4 : Symbol(ff4, Decl(genericRestParameters1.ts, 159, 11)) - diff --git a/tests/baselines/reference/genericRestParameters1.types b/tests/baselines/reference/genericRestParameters1.types index 6dfee15241288..56764f8387686 100644 --- a/tests/baselines/reference/genericRestParameters1.types +++ b/tests/baselines/reference/genericRestParameters1.types @@ -1,508 +1,4 @@ === tests/cases/conformance/types/rest/genericRestParameters1.ts === -declare let f1: (...x: [number, string, boolean]) => void; ->f1 : (x_0: number, x_1: string, x_2: boolean) => void ->x : [number, string, boolean] - -declare let f2: (x0: number, x1: string, x2: boolean) => void; ->f2 : (x0: number, x1: string, x2: boolean) => void ->x0 : number ->x1 : string ->x2 : boolean - -f1 = f2; ->f1 = f2 : (x0: number, x1: string, x2: boolean) => void ->f1 : (x_0: number, x_1: string, x_2: boolean) => void ->f2 : (x0: number, x1: string, x2: boolean) => void - -f2 = f1; ->f2 = f1 : (x_0: number, x_1: string, x_2: boolean) => void ->f2 : (x0: number, x1: string, x2: boolean) => void ->f1 : (x_0: number, x_1: string, x_2: boolean) => void - -declare const t3: [number, string, boolean]; ->t3 : [number, string, boolean] - -declare const t2: [string, boolean]; ->t2 : [string, boolean] - -declare const t1: [boolean]; ->t1 : [boolean] - -declare const t0: []; ->t0 : [] - -declare const ns: [number, string]; ->ns : [number, string] - -declare const sn: [string, number]; ->sn : [string, number] - -f1(42, "hello", true); ->f1(42, "hello", true) : void ->f1 : (x_0: number, x_1: string, x_2: boolean) => void ->42 : 42 ->"hello" : "hello" ->true : true - -f1(t3[0], t3[1], t3[2]); ->f1(t3[0], t3[1], t3[2]) : void ->f1 : (x_0: number, x_1: string, x_2: boolean) => void ->t3[0] : number ->t3 : [number, string, boolean] ->0 : 0 ->t3[1] : string ->t3 : [number, string, boolean] ->1 : 1 ->t3[2] : boolean ->t3 : [number, string, boolean] ->2 : 2 - -f1(...t3); ->f1(...t3) : void ->f1 : (x_0: number, x_1: string, x_2: boolean) => void ->...t3 : string | number | boolean ->t3 : [number, string, boolean] - -f1(42, ...t2); ->f1(42, ...t2) : void ->f1 : (x_0: number, x_1: string, x_2: boolean) => void ->42 : 42 ->...t2 : string | boolean ->t2 : [string, boolean] - -f1(42, "hello", ...t1); ->f1(42, "hello", ...t1) : void ->f1 : (x_0: number, x_1: string, x_2: boolean) => void ->42 : 42 ->"hello" : "hello" ->...t1 : boolean ->t1 : [boolean] - -f1(42, "hello", true, ...t0); ->f1(42, "hello", true, ...t0) : void ->f1 : (x_0: number, x_1: string, x_2: boolean) => void ->42 : 42 ->"hello" : "hello" ->true : true ->...t0 : never ->t0 : [] - -f1(ns[0], ns[1], true); ->f1(ns[0], ns[1], true) : void ->f1 : (x_0: number, x_1: string, x_2: boolean) => void ->ns[0] : number ->ns : [number, string] ->0 : 0 ->ns[1] : string ->ns : [number, string] ->1 : 1 ->true : true - -f1(...ns, true); // FIXME: Error, since ...ns is considered as string|number here ->f1(...ns, true) : void ->f1 : (x_0: number, x_1: string, x_2: boolean) => void ->...ns : string | number ->ns : [number, string] ->true : true - -f2(42, "hello", true); ->f2(42, "hello", true) : void ->f2 : (x0: number, x1: string, x2: boolean) => void ->42 : 42 ->"hello" : "hello" ->true : true - -f2(t3[0], t3[1], t3[2]); ->f2(t3[0], t3[1], t3[2]) : void ->f2 : (x0: number, x1: string, x2: boolean) => void ->t3[0] : number ->t3 : [number, string, boolean] ->0 : 0 ->t3[1] : string ->t3 : [number, string, boolean] ->1 : 1 ->t3[2] : boolean ->t3 : [number, string, boolean] ->2 : 2 - -f2(...t3); ->f2(...t3) : void ->f2 : (x0: number, x1: string, x2: boolean) => void ->...t3 : string | number | boolean ->t3 : [number, string, boolean] - -f2(42, ...t2); ->f2(42, ...t2) : void ->f2 : (x0: number, x1: string, x2: boolean) => void ->42 : 42 ->...t2 : string | boolean ->t2 : [string, boolean] - -f2(42, "hello", ...t1); ->f2(42, "hello", ...t1) : void ->f2 : (x0: number, x1: string, x2: boolean) => void ->42 : 42 ->"hello" : "hello" ->...t1 : boolean ->t1 : [boolean] - -f2(42, "hello", true, ...t0); ->f2(42, "hello", true, ...t0) : void ->f2 : (x0: number, x1: string, x2: boolean) => void ->42 : 42 ->"hello" : "hello" ->true : true ->...t0 : never ->t0 : [] - -f2(ns[0], ns[1], true); ->f2(ns[0], ns[1], true) : void ->f2 : (x0: number, x1: string, x2: boolean) => void ->ns[0] : number ->ns : [number, string] ->0 : 0 ->ns[1] : string ->ns : [number, string] ->1 : 1 ->true : true - -f2(...ns, true); // FIXME: Error, since ...ns is considered as string|number here ->f2(...ns, true) : void ->f2 : (x0: number, x1: string, x2: boolean) => void ->...ns : string | number ->ns : [number, string] ->true : true - -declare function f10(...args: T): T; ->f10 : (...args: T) => T ->args : T - -const x10 = f10(42, "hello", true); // [number, string, boolean] ->x10 : [number, string, boolean] ->f10(42, "hello", true) : [number, string, boolean] ->f10 : (...args: T) => T ->42 : 42 ->"hello" : "hello" ->true : true - -const x11 = f10(42, "hello"); // [number, string] ->x11 : [number, string] ->f10(42, "hello") : [number, string] ->f10 : (...args: T) => T ->42 : 42 ->"hello" : "hello" - -const x12 = f10(42); // [number] ->x12 : [number] ->f10(42) : [number] ->f10 : (...args: T) => T ->42 : 42 - -const x13 = f10(); // [] ->x13 : [] ->f10() : [] ->f10 : (...args: T) => T - -const x14 = f10(...t3); // [number, string, boolean] ->x14 : [number, string, boolean] ->f10(...t3) : [number, string, boolean] ->f10 : (...args: T) => T ->...t3 : string | number | boolean ->t3 : [number, string, boolean] - -const x15 = f10(42, ...t2); // [number, string, boolean] ->x15 : [number, string, boolean] ->f10(42, ...t2) : [number, string, boolean] ->f10 : (...args: T) => T ->42 : 42 ->...t2 : string | boolean ->t2 : [string, boolean] - -const x16 = f10(42, "hello", ...t1); // [number, string, boolean] ->x16 : [number, string, boolean] ->f10(42, "hello", ...t1) : [number, string, boolean] ->f10 : (...args: T) => T ->42 : 42 ->"hello" : "hello" ->...t1 : boolean ->t1 : [boolean] - -const x17 = f10(42, "hello", true, ...t0); // [number, string, boolean] ->x17 : [number, string, boolean] ->f10(42, "hello", true, ...t0) : [number, string, boolean] ->f10 : (...args: T) => T ->42 : 42 ->"hello" : "hello" ->true : true ->...t0 : never ->t0 : [] - -const x18 = f10(...ns, true); // (string | number | boolean)[] ->x18 : (string | number | boolean)[] ->f10(...ns, true) : (string | number | boolean)[] ->f10 : (...args: T) => T ->...ns : string | number ->ns : [number, string] ->true : true - -function g10(u: U, v: V) { ->g10 : (u: U, v: V) => void ->u : U ->v : V - - let x1 = f10(...u); // U ->x1 : U ->f10(...u) : U ->f10 : (...args: T) => T ->...u : string ->u : U - - let x2 = f10(...v); // V ->x2 : V ->f10(...v) : V ->f10 : (...args: T) => T ->...v : number ->v : V - - let x3 = f10(1, ...u); // [number, ...string[]] ->x3 : [number, ...string[]] ->f10(1, ...u) : [number, ...string[]] ->f10 : (...args: T) => T ->1 : 1 ->...u : string ->u : U - - let x4 = f10(...u, ...v); // (string | number)[] ->x4 : (string | number)[] ->f10(...u, ...v) : (string | number)[] ->f10 : (...args: T) => T ->...u : string ->u : U ->...v : number ->v : V -} - -declare function f11(...args: T): T; ->f11 : (...args: T) => T ->args : T - -const z10 = f11(42, "hello", true); // [42, "hello", true] ->z10 : [42, "hello", true] ->f11(42, "hello", true) : [42, "hello", true] ->f11 : (...args: T) => T ->42 : 42 ->"hello" : "hello" ->true : true - -const z11 = f11(42, "hello"); // [42, "hello"] ->z11 : [42, "hello"] ->f11(42, "hello") : [42, "hello"] ->f11 : (...args: T) => T ->42 : 42 ->"hello" : "hello" - -const z12 = f11(42); // [42] ->z12 : [42] ->f11(42) : [42] ->f11 : (...args: T) => T ->42 : 42 - -const z13 = f11(); // [] ->z13 : [] ->f11() : [] ->f11 : (...args: T) => T - -const z14 = f11(...t3); // [number, string, boolean] ->z14 : [number, string, boolean] ->f11(...t3) : [number, string, boolean] ->f11 : (...args: T) => T ->...t3 : string | number | boolean ->t3 : [number, string, boolean] - -const z15 = f11(42, ...t2); // [42, string, boolean] ->z15 : [42, string, boolean] ->f11(42, ...t2) : [42, string, boolean] ->f11 : (...args: T) => T ->42 : 42 ->...t2 : string | boolean ->t2 : [string, boolean] - -const z16 = f11(42, "hello", ...t1); // [42, "hello", boolean] ->z16 : [42, "hello", boolean] ->f11(42, "hello", ...t1) : [42, "hello", boolean] ->f11 : (...args: T) => T ->42 : 42 ->"hello" : "hello" ->...t1 : boolean ->t1 : [boolean] - -const z17 = f11(42, "hello", true, ...t0); // [42, "hello", true] ->z17 : [42, "hello", true] ->f11(42, "hello", true, ...t0) : [42, "hello", true] ->f11 : (...args: T) => T ->42 : 42 ->"hello" : "hello" ->true : true ->...t0 : never ->t0 : [] - -const z18 = f11(...ns, true); // (string | number | true)[] ->z18 : (string | number | true)[] ->f11(...ns, true) : (string | number | true)[] ->f11 : (...args: T) => T ->...ns : string | number ->ns : [number, string] ->true : true - -function g11(u: U, v: V) { ->g11 : (u: U, v: V) => void ->u : U ->v : V - - let x1 = f11(...u); // U ->x1 : U ->f11(...u) : U ->f11 : (...args: T) => T ->...u : string ->u : U - - let x2 = f11(...v); // V ->x2 : V ->f11(...v) : V ->f11 : (...args: T) => T ->...v : number ->v : V - - let x3 = f11(1, ...u); // [1, ...string[]] ->x3 : [1, ...string[]] ->f11(1, ...u) : [1, ...string[]] ->f11 : (...args: T) => T ->1 : 1 ->...u : string ->u : U - - let x4 = f11(...u, ...v); // (string | number)[] ->x4 : (string | number)[] ->f11(...u, ...v) : (string | number)[] ->f11 : (...args: T) => T ->...u : string ->u : U ->...v : number ->v : V -} - -function call(f: (...args: T) => U, ...args: T) { ->call : (f: (...args: T) => U, ...args: T) => U ->f : (...args: T) => U ->args : T ->args : T - - return f(...args); ->f(...args) : U ->f : (...args: T) => U ->...args : unknown ->args : T -} - -function callr(args: T, f: (...args: T) => U) { ->callr : (args: T, f: (...args: T) => U) => U ->args : T ->f : (...args: T) => U ->args : T - - return f(...args); ->f(...args) : U ->f : (...args: T) => U ->...args : unknown ->args : T -} - -declare function f15(a: string, b: number): string | number; ->f15 : (a: string, b: number) => string | number ->a : string ->b : number - -declare function f16(a: A, b: B): A | B; ->f16 : (a: A, b: B) => A | B ->a : A ->b : B - -let x20 = call((x, y) => x + y, 10, 20); // number ->x20 : number ->call((x, y) => x + y, 10, 20) : number ->call : (f: (...args: T) => U, ...args: T) => U ->(x, y) => x + y : (x: number, y: number) => number ->x : number ->y : number ->x + y : number ->x : number ->y : number ->10 : 10 ->20 : 20 - -let x21 = call((x, y) => x + y, 10, "hello"); // string ->x21 : string ->call((x, y) => x + y, 10, "hello") : string ->call : (f: (...args: T) => U, ...args: T) => U ->(x, y) => x + y : (x: number, y: string) => string ->x : number ->y : string ->x + y : string ->x : number ->y : string ->10 : 10 ->"hello" : "hello" - -let x22 = call(f15, "hello", 42); // string | number ->x22 : string | number ->call(f15, "hello", 42) : string | number ->call : (f: (...args: T) => U, ...args: T) => U ->f15 : (a: string, b: number) => string | number ->"hello" : "hello" ->42 : 42 - -let x23 = call(f16, "hello", 42); // unknown ->x23 : string | number ->call(f16, "hello", 42) : string | number ->call : (f: (...args: T) => U, ...args: T) => U ->f16 : (a: A, b: B) => A | B ->"hello" : "hello" ->42 : 42 - -let x24 = call<[string, number], string | number>(f16, "hello", 42); // string | number ->x24 : string | number ->call<[string, number], string | number>(f16, "hello", 42) : string | number ->call : (f: (...args: T) => U, ...args: T) => U ->f16 : (a: A, b: B) => A | B ->"hello" : "hello" ->42 : 42 - -let x30 = callr(sn, (x, y) => x + y); // string ->x30 : string ->callr(sn, (x, y) => x + y) : string ->callr : (args: T, f: (...args: T) => U) => U ->sn : [string, number] ->(x, y) => x + y : (x: string, y: number) => string ->x : string ->y : number ->x + y : string ->x : string ->y : number - -let x31 = callr(sn, f15); // string | number ->x31 : string | number ->callr(sn, f15) : string | number ->callr : (args: T, f: (...args: T) => U) => U ->sn : [string, number] ->f15 : (a: string, b: number) => string | number - -let x32 = callr(sn, f16); // string | number ->x32 : string | number ->callr(sn, f16) : string | number ->callr : (args: T, f: (...args: T) => U) => U ->sn : [string, number] ->f16 : (a: A, b: B) => A | B - function bind(f: (x: T, ...rest: U) => V, x: T) { >bind : (f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V >f : (x: T, ...rest: U) => V @@ -519,280 +15,3 @@ function bind(f: (x: T, ...rest: U) => V, x: T) { >...rest : unknown >rest : U } - -declare const f20: (x: number, y: string, z: boolean) => string[]; ->f20 : (x: number, y: string, z: boolean) => string[] ->x : number ->y : string ->z : boolean - -const f21 = bind(f20, 42); // (y: string, z: boolean) => string[] ->f21 : (y: string, z: boolean) => string[] ->bind(f20, 42) : (y: string, z: boolean) => string[] ->bind : (f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V ->f20 : (x: number, y: string, z: boolean) => string[] ->42 : 42 - -const f22 = bind(f21, "hello"); // (z: boolean) => string[] ->f22 : (z: boolean) => string[] ->bind(f21, "hello") : (z: boolean) => string[] ->bind : (f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V ->f21 : (y: string, z: boolean) => string[] ->"hello" : "hello" - -const f23 = bind(f22, true); // () => string[] ->f23 : () => string[] ->bind(f22, true) : () => string[] ->bind : (f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V ->f22 : (z: boolean) => string[] ->true : true - -f20(42, "hello", true); ->f20(42, "hello", true) : string[] ->f20 : (x: number, y: string, z: boolean) => string[] ->42 : 42 ->"hello" : "hello" ->true : true - -f21("hello", true); ->f21("hello", true) : string[] ->f21 : (y: string, z: boolean) => string[] ->"hello" : "hello" ->true : true - -f22(true); ->f22(true) : string[] ->f22 : (z: boolean) => string[] ->true : true - -f23(); ->f23() : string[] ->f23 : () => string[] - -declare const g20: (x: number, y?: string, z?: boolean) => string[]; ->g20 : (x: number, y?: string | undefined, z?: boolean | undefined) => string[] ->x : number ->y : string | undefined ->z : boolean | undefined - -const g21 = bind(g20, 42); // (y: string, z: boolean) => string[] ->g21 : (y?: string | undefined, z?: boolean | undefined) => string[] ->bind(g20, 42) : (y?: string | undefined, z?: boolean | undefined) => string[] ->bind : (f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V ->g20 : (x: number, y?: string | undefined, z?: boolean | undefined) => string[] ->42 : 42 - -const g22 = bind(g21, "hello"); // (z: boolean) => string[] ->g22 : (z?: boolean | undefined) => string[] ->bind(g21, "hello") : (z?: boolean | undefined) => string[] ->bind : (f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V ->g21 : (y?: string | undefined, z?: boolean | undefined) => string[] ->"hello" : "hello" - -const g23 = bind(g22, true); // () => string[] ->g23 : () => string[] ->bind(g22, true) : () => string[] ->bind : (f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V ->g22 : (z?: boolean | undefined) => string[] ->true : true - -g20(42, "hello", true); ->g20(42, "hello", true) : string[] ->g20 : (x: number, y?: string | undefined, z?: boolean | undefined) => string[] ->42 : 42 ->"hello" : "hello" ->true : true - -g20(42, "hello"); ->g20(42, "hello") : string[] ->g20 : (x: number, y?: string | undefined, z?: boolean | undefined) => string[] ->42 : 42 ->"hello" : "hello" - -g20(42); ->g20(42) : string[] ->g20 : (x: number, y?: string | undefined, z?: boolean | undefined) => string[] ->42 : 42 - -g21("hello", true); ->g21("hello", true) : string[] ->g21 : (y?: string | undefined, z?: boolean | undefined) => string[] ->"hello" : "hello" ->true : true - -g21("hello"); ->g21("hello") : string[] ->g21 : (y?: string | undefined, z?: boolean | undefined) => string[] ->"hello" : "hello" - -g21(); ->g21() : string[] ->g21 : (y?: string | undefined, z?: boolean | undefined) => string[] - -g22(true); ->g22(true) : string[] ->g22 : (z?: boolean | undefined) => string[] ->true : true - -g22(); ->g22() : string[] ->g22 : (z?: boolean | undefined) => string[] - -g23(); ->g23() : string[] ->g23 : () => string[] - -declare function f30 any)[]>(x: T, ...args: U): U; ->f30 : any)[]>(x: T, ...args: U) => U ->x : T ->x : T ->args : U - -const c30 = f30(42, x => "" + x, x => x + 1); // [(x: number) => string, (x: number) => number] ->c30 : [(x: number) => string, (x: number) => number] ->f30(42, x => "" + x, x => x + 1) : [(x: number) => string, (x: number) => number] ->f30 : any)[]>(x: T, ...args: U) => U ->42 : 42 ->x => "" + x : (x: number) => string ->x : number ->"" + x : string ->"" : "" ->x : number ->x => x + 1 : (x: number) => number ->x : number ->x + 1 : number ->x : number ->1 : 1 - -type T01 = Parameters<(x: number, y: string, z: boolean) => void>; ->T01 : [x: number, y: string, z: boolean] ->x : number ->y : string ->z : boolean - -type T02 = Parameters<(...args: [number, string, boolean]) => void>; ->T02 : [number, string, boolean] ->args : [number, string, boolean] - -type T03 = ConstructorParameters void>; ->T03 : [x: number, y: string, z: boolean] ->x : number ->y : string ->z : boolean - -type T04 = ConstructorParameters void>; ->T04 : [number, string, boolean] ->args : [number, string, boolean] - -type T05 = Parameters<(...args: T[]) => void>; ->T05 : T[] ->args : T[] - -type T06 = ConstructorParameters void>; ->T06 : [] ->args : [] - -type T07 = Parameters<(...args: T) => void>; ->T07 : T ->args : T - -type T08 = ConstructorParameters void>; ->T08 : T ->args : T - -type T09 = Parameters; ->T09 : never - -type Record1 = { ->Record1 : Record1 - - move: [number, 'left' | 'right']; ->move : [number, "left" | "right"] - - jump: [number, 'up' | 'down']; ->jump : [number, "up" | "down"] - - stop: string; ->stop : string - - done: []; ->done : [] -} - -type EventType = { ->EventType : EventType - - emit(e: K, ...payload: T[K] extends any[] ? T[K] : [T[K]]): void; ->emit : (e: K, ...payload: T[K] extends any[] ? T[K] : [T[K]]) => void ->e : K ->payload : T[K] extends any[] ? T[K] : [T[K]] -} - -declare var events: EventType; ->events : EventType - -events.emit('move', 10, 'left'); ->events.emit('move', 10, 'left') : void ->events.emit : (e: K, ...payload: Record1[K] extends any[] ? Record1[K] : [Record1[K]]) => void ->events : EventType ->emit : (e: K, ...payload: Record1[K] extends any[] ? Record1[K] : [Record1[K]]) => void ->'move' : "move" ->10 : 10 ->'left' : "left" - -events.emit('jump', 20, 'up'); ->events.emit('jump', 20, 'up') : void ->events.emit : (e: K, ...payload: Record1[K] extends any[] ? Record1[K] : [Record1[K]]) => void ->events : EventType ->emit : (e: K, ...payload: Record1[K] extends any[] ? Record1[K] : [Record1[K]]) => void ->'jump' : "jump" ->20 : 20 ->'up' : "up" - -events.emit('stop', 'Bye!'); ->events.emit('stop', 'Bye!') : void ->events.emit : (e: K, ...payload: Record1[K] extends any[] ? Record1[K] : [Record1[K]]) => void ->events : EventType ->emit : (e: K, ...payload: Record1[K] extends any[] ? Record1[K] : [Record1[K]]) => void ->'stop' : "stop" ->'Bye!' : "Bye!" - -events.emit('done'); ->events.emit('done') : void ->events.emit : (e: K, ...payload: Record1[K] extends any[] ? Record1[K] : [Record1[K]]) => void ->events : EventType ->emit : (e: K, ...payload: Record1[K] extends any[] ? Record1[K] : [Record1[K]]) => void ->'done' : "done" - -// Repro from #25871 - -declare var ff1: (... args: any[]) => void; ->ff1 : (...args: any[]) => void ->args : any[] - -declare var ff2: () => void; ->ff2 : () => void - -declare var ff3: (...args: []) => void; ->ff3 : () => void ->args : [] - -declare var ff4: (a: never) => void; ->ff4 : (a: never) => void ->a : never - -ff1 = ff2; ->ff1 = ff2 : () => void ->ff1 : (...args: any[]) => void ->ff2 : () => void - -ff1 = ff3; ->ff1 = ff3 : () => void ->ff1 : (...args: any[]) => void ->ff3 : () => void - -ff1 = ff4; // Error ->ff1 = ff4 : (a: never) => void ->ff1 : (...args: any[]) => void ->ff4 : (a: never) => void - diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.js b/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.js index 21ffeabb92a0a..36a12ceadda5b 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.js +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.js @@ -90,6 +90,10 @@ var SetOf = /** @class */ (function () { }()); /* ... etc ... */ function compose() { + var fns = []; + for (var _i = 0; _i < arguments.length; _i++) { + fns[_i] = arguments[_i]; + } return function (x) { return fns.reduce(function (prev, fn) { return fn(prev); }, x); }; } function map(fn) { diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.js b/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.js index f35e057af8c33..332de9e7409af 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.js +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.js @@ -124,6 +124,10 @@ var SetOf = /** @class */ (function () { }()); /* ... etc ... */ function compose() { + var fns = []; + for (var _i = 0; _i < arguments.length; _i++) { + fns[_i] = arguments[_i]; + } return function (x) { return fns.reduce(function (prev, fn) { return fn(prev); }, x); }; } function map(fn) { diff --git a/tests/baselines/reference/inferTypes1.js b/tests/baselines/reference/inferTypes1.js index f69b002f48392..01dc5a797f224 100644 --- a/tests/baselines/reference/inferTypes1.js +++ b/tests/baselines/reference/inferTypes1.js @@ -195,6 +195,10 @@ var z1 = ex.customClass; var z2 = ex.obj.nested.attr; // Repros from #26856 function invoker(key) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } return function (obj) { return obj[key].apply(obj, args); }; } var result = invoker('test', true)({ test: function (a) { return 123; } }); diff --git a/tests/baselines/reference/keyofAndIndexedAccess.js b/tests/baselines/reference/keyofAndIndexedAccess.js index e56ad3d5434da..2539bab930551 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.js +++ b/tests/baselines/reference/keyofAndIndexedAccess.js @@ -943,13 +943,9 @@ var OtherPerson = /** @class */ (function () { return OtherPerson; }()); function path(obj) { - var keys = []; - for (var _i = 1; _i < arguments.length; _i++) { - keys[_i - 1] = arguments[_i]; - } var result = obj; - for (var _a = 0, keys_1 = keys; _a < keys_1.length; _a++) { - var k = keys_1[_a]; + for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { + var k = keys_1[_i]; result = result[k]; } return result; diff --git a/tests/baselines/reference/literalTypeWidening.js b/tests/baselines/reference/literalTypeWidening.js index c28c3593b507f..ceb6d46e1c11f 100644 --- a/tests/baselines/reference/literalTypeWidening.js +++ b/tests/baselines/reference/literalTypeWidening.js @@ -254,11 +254,11 @@ function onMouseOver() { return "onmouseover"; } var x = onMouseOver(); // Repro from #23649 function Set() { + var result = {}; var keys = []; for (var _i = 0; _i < arguments.length; _i++) { keys[_i] = arguments[_i]; } - var result = {}; keys.forEach(function (key) { return result[key] = true; }); return result; } diff --git a/tests/baselines/reference/mixinClassesAnnotated.js b/tests/baselines/reference/mixinClassesAnnotated.js index 4c5269508f4fc..cb350fc959498 100644 --- a/tests/baselines/reference/mixinClassesAnnotated.js +++ b/tests/baselines/reference/mixinClassesAnnotated.js @@ -112,10 +112,6 @@ function Tagged(superClass) { var C = /** @class */ (function (_super) { __extends(C, _super); function C() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } var _this = _super.apply(this, args) || this; _this._tag = "hello"; return _this; diff --git a/tests/baselines/reference/mixinClassesAnonymous.js b/tests/baselines/reference/mixinClassesAnonymous.js index f2328d4c6d120..7fb0f613e5646 100644 --- a/tests/baselines/reference/mixinClassesAnonymous.js +++ b/tests/baselines/reference/mixinClassesAnonymous.js @@ -111,10 +111,6 @@ function Tagged(superClass) { var C = /** @class */ (function (_super) { __extends(C, _super); function C() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } var _this = _super.apply(this, args) || this; _this._tag = "hello"; return _this; diff --git a/tests/baselines/reference/mixinPrivateAndProtected.js b/tests/baselines/reference/mixinPrivateAndProtected.js index 601cce00e375b..6dd96562d1a61 100644 --- a/tests/baselines/reference/mixinPrivateAndProtected.js +++ b/tests/baselines/reference/mixinPrivateAndProtected.js @@ -176,10 +176,6 @@ function PersonMixin(Base) { return /** @class */ (function (_super) { __extends(class_4, _super); function class_4() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } return _super.apply(this, args) || this; } class_4.prototype.myProtectedFunction = function () { diff --git a/tests/baselines/reference/mixingApparentTypeOverrides.js b/tests/baselines/reference/mixingApparentTypeOverrides.js index 74f9afc83894d..1cd01cafb5849 100644 --- a/tests/baselines/reference/mixingApparentTypeOverrides.js +++ b/tests/baselines/reference/mixingApparentTypeOverrides.js @@ -46,10 +46,6 @@ function Tagged(Base) { return /** @class */ (function (_super) { __extends(class_1, _super); function class_1() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } var _this = _super.apply(this, args) || this; _this._tag = ""; return _this; diff --git a/tests/baselines/reference/nonArrayRestArgs.js b/tests/baselines/reference/nonArrayRestArgs.js index 52d5da15f93ee..813f7141b5ccd 100644 --- a/tests/baselines/reference/nonArrayRestArgs.js +++ b/tests/baselines/reference/nonArrayRestArgs.js @@ -6,6 +6,10 @@ function foo(...rest: number) { // error //// [nonArrayRestArgs.js] function foo() { + var rest = []; + for (var _i = 0; _i < arguments.length; _i++) { + rest[_i] = arguments[_i]; + } var x = rest[0]; return x; } diff --git a/tests/baselines/reference/recursiveTypeRelations.js b/tests/baselines/reference/recursiveTypeRelations.js index 78dc4ff0ac898..5ee456dee116c 100644 --- a/tests/baselines/reference/recursiveTypeRelations.js +++ b/tests/baselines/reference/recursiveTypeRelations.js @@ -47,6 +47,10 @@ var Query = /** @class */ (function () { return Query; }()); function css(styles) { + var classNames = []; + for (var _i = 1; _i < arguments.length; _i++) { + classNames[_i - 1] = arguments[_i]; + } var args = classNames.map(function (arg) { if (arg == null) { return null; diff --git a/tests/baselines/reference/restParameterInDownlevelGenerator.js b/tests/baselines/reference/restParameterInDownlevelGenerator.js index 3a1dbe6a7ac95..90f6994732e8a 100644 --- a/tests/baselines/reference/restParameterInDownlevelGenerator.js +++ b/tests/baselines/reference/restParameterInDownlevelGenerator.js @@ -7,12 +7,8 @@ function * mergeStringLists(...strings: string[]) { //// [restParameterInDownlevelGenerator.js] // https://github.com/Microsoft/TypeScript/issues/30653 function mergeStringLists() { - var _i, strings_1, strings_1_1, str; + var strings_1, strings_1_1, str; var e_1, _a; - var strings = []; - for (_i = 0; _i < arguments.length; _i++) { - strings[_i] = arguments[_i]; - } return __generator(this, function (_b) { try { for (strings_1 = __values(strings), strings_1_1 = strings_1.next(); !strings_1_1.done; strings_1_1 = strings_1.next()) { diff --git a/tests/baselines/reference/restParameterNoTypeAnnotation.js b/tests/baselines/reference/restParameterNoTypeAnnotation.js index 4a866bd298523..b22b531675daf 100644 --- a/tests/baselines/reference/restParameterNoTypeAnnotation.js +++ b/tests/baselines/reference/restParameterNoTypeAnnotation.js @@ -7,6 +7,10 @@ function foo(...rest) { //// [restParameterNoTypeAnnotation.js] function foo() { + var rest = []; + for (var _i = 0; _i < arguments.length; _i++) { + rest[_i] = arguments[_i]; + } var x = rest[0]; return x; } diff --git a/tests/baselines/reference/sourceMapSample.js b/tests/baselines/reference/sourceMapSample.js index b9ef2611c9b11..7caad24260696 100644 --- a/tests/baselines/reference/sourceMapSample.js +++ b/tests/baselines/reference/sourceMapSample.js @@ -56,12 +56,12 @@ var Foo; var greeter = new Greeter("Hello, world!"); var str = greeter.greet(); function foo2(greeting) { + var greeters = []; + greeters[0] = new Greeter(greeting); var restGreetings = []; for (var _i = 1; _i < arguments.length; _i++) { restGreetings[_i - 1] = arguments[_i]; } - var greeters = []; - greeters[0] = new Greeter(greeting); for (var i = 0; i < restGreetings.length; i++) { greeters.push(new Greeter(restGreetings[i])); } diff --git a/tests/baselines/reference/sourceMapSample.js.map b/tests/baselines/reference/sourceMapSample.js.map index e6aefac56b4f7..37bb0d1497dd2 100644 --- a/tests/baselines/reference/sourceMapSample.js.map +++ b/tests/baselines/reference/sourceMapSample.js.map @@ -1,3 +1,3 @@ //// [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;QACV,YAAY,CAAC;QAEb;YACI,iBAAmB,QAAgB;gBAAhB,aAAQ,GAAR,QAAQ,CAAQ;YACnC,CAAC;YAED,uBAAK,GAAL;gBACI,OAAO,MAAM,GAAG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;YAC5C,CAAC;YACL,cAAC;QAAD,CAAC,AAPD,IAOC;QAGD,SAAS,GAAG,CAAC,QAAgB;YACzB,OAAO,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,SAAS,IAAI,CAAC,QAAgB;YAAE,uBAA0B;iBAA1B,UAA0B,EAA1B,qBAA0B,EAA1B,IAA0B;gBAA1B,sCAA0B;;YACtD,IAAI,QAAQ,GAAc,EAAE,CAAC;YAC7B,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;YACpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC3C,QAAQ,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aAChD;YAED,OAAO,QAAQ,CAAC;QACpB,CAAC;QAED,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QACpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC/B,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;SAChB;IACL,CAAC,EAlCU,GAAG,GAAH,OAAG,KAAH,OAAG,QAkCb;AAAD,CAAC,EAlCM,GAAG,KAAH,GAAG,QAkCT"} -//// https://sokra.github.io/source-map-visualization#base64,dmFyIEZvbzsNCihmdW5jdGlvbiAoRm9vKSB7DQogICAgdmFyIEJhcjsNCiAgICAoZnVuY3Rpb24gKEJhcikgew0KICAgICAgICAidXNlIHN0cmljdCI7DQogICAgICAgIHZhciBHcmVldGVyID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKCkgew0KICAgICAgICAgICAgZnVuY3Rpb24gR3JlZXRlcihncmVldGluZykgew0KICAgICAgICAgICAgICAgIHRoaXMuZ3JlZXRpbmcgPSBncmVldGluZzsNCiAgICAgICAgICAgIH0NCiAgICAgICAgICAgIEdyZWV0ZXIucHJvdG90eXBlLmdyZWV0ID0gZnVuY3Rpb24gKCkgew0KICAgICAgICAgICAgICAgIHJldHVybiAiPGgxPiIgKyB0aGlzLmdyZWV0aW5nICsgIjwvaDE+IjsNCiAgICAgICAgICAgIH07DQogICAgICAgICAgICByZXR1cm4gR3JlZXRlcjsNCiAgICAgICAgfSgpKTsNCiAgICAgICAgZnVuY3Rpb24gZm9vKGdyZWV0aW5nKSB7DQogICAgICAgICAgICByZXR1cm4gbmV3IEdyZWV0ZXIoZ3JlZXRpbmcpOw0KICAgICAgICB9DQogICAgICAgIHZhciBncmVldGVyID0gbmV3IEdyZWV0ZXIoIkhlbGxvLCB3b3JsZCEiKTsNCiAgICAgICAgdmFyIHN0ciA9IGdyZWV0ZXIuZ3JlZXQoKTsNCiAgICAgICAgZnVuY3Rpb24gZm9vMihncmVldGluZykgew0KICAgICAgICAgICAgdmFyIHJlc3RHcmVldGluZ3MgPSBbXTsNCiAgICAgICAgICAgIGZvciAodmFyIF9pID0gMTsgX2kgPCBhcmd1bWVudHMubGVuZ3RoOyBfaSsrKSB7DQogICAgICAgICAgICAgICAgcmVzdEdyZWV0aW5nc1tfaSAtIDFdID0gYXJndW1lbnRzW19pXTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgICAgIHZhciBncmVldGVycyA9IFtdOw0KICAgICAgICAgICAgZ3JlZXRlcnNbMF0gPSBuZXcgR3JlZXRlcihncmVldGluZyk7DQogICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHJlc3RHcmVldGluZ3MubGVuZ3RoOyBpKyspIHsNCiAgICAgICAgICAgICAgICBncmVldGVycy5wdXNoKG5ldyBHcmVldGVyKHJlc3RHcmVldGluZ3NbaV0pKTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgICAgIHJldHVybiBncmVldGVyczsNCiAgICAgICAgfQ0KICAgICAgICB2YXIgYiA9IGZvbzIoIkhlbGxvIiwgIldvcmxkIiwgIiEiKTsNCiAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBiLmxlbmd0aDsgaisrKSB7DQogICAgICAgICAgICBiW2pdLmdyZWV0KCk7DQogICAgICAgIH0NCiAgICB9KShCYXIgPSBGb28uQmFyIHx8IChGb28uQmFyID0ge30pKTsNCn0pKEZvbyB8fCAoRm9vID0ge30pKTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPXNvdXJjZU1hcFNhbXBsZS5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlTWFwU2FtcGxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic291cmNlTWFwU2FtcGxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLElBQU8sR0FBRyxDQWtDVDtBQWxDRCxXQUFPLEdBQUc7SUFBQyxJQUFBLEdBQUcsQ0FrQ2I7SUFsQ1UsV0FBQSxHQUFHO1FBQ1YsWUFBWSxDQUFDO1FBRWI7WUFDSSxpQkFBbUIsUUFBZ0I7Z0JBQWhCLGFBQVEsR0FBUixRQUFRLENBQVE7WUFDbkMsQ0FBQztZQUVELHVCQUFLLEdBQUw7Z0JBQ0ksT0FBTyxNQUFNLEdBQUcsSUFBSSxDQUFDLFFBQVEsR0FBRyxPQUFPLENBQUM7WUFDNUMsQ0FBQztZQUNMLGNBQUM7UUFBRCxDQUFDLEFBUEQsSUFPQztRQUdELFNBQVMsR0FBRyxDQUFDLFFBQWdCO1lBQ3pCLE9BQU8sSUFBSSxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUM7UUFDakMsQ0FBQztRQUVELElBQUksT0FBTyxHQUFHLElBQUksT0FBTyxDQUFDLGVBQWUsQ0FBQyxDQUFDO1FBQzNDLElBQUksR0FBRyxHQUFHLE9BQU8sQ0FBQyxLQUFLLEVBQUUsQ0FBQztRQUUxQixTQUFTLElBQUksQ0FBQyxRQUFnQjtZQUFFLHVCQUEwQjtpQkFBMUIsVUFBMEIsRUFBMUIscUJBQTBCLEVBQTFCLElBQTBCO2dCQUExQixzQ0FBMEI7O1lBQ3RELElBQUksUUFBUSxHQUFjLEVBQUUsQ0FBQztZQUM3QixRQUFRLENBQUMsQ0FBQyxDQUFDLEdBQUcsSUFBSSxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUM7WUFDcEMsS0FBSyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLGFBQWEsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxFQUFFLEVBQUU7Z0JBQzNDLFFBQVEsQ0FBQyxJQUFJLENBQUMsSUFBSSxPQUFPLENBQUMsYUFBYSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQzthQUNoRDtZQUVELE9BQU8sUUFBUSxDQUFDO1FBQ3BCLENBQUM7UUFFRCxJQUFJLENBQUMsR0FBRyxJQUFJLENBQUMsT0FBTyxFQUFFLE9BQU8sRUFBRSxHQUFHLENBQUMsQ0FBQztRQUNwQyxLQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsQ0FBQyxDQUFDLE1BQU0sRUFBRSxDQUFDLEVBQUUsRUFBRTtZQUMvQixDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsS0FBSyxFQUFFLENBQUM7U0FDaEI7SUFDTCxDQUFDLEVBbENVLEdBQUcsR0FBSCxPQUFHLEtBQUgsT0FBRyxRQWtDYjtBQUFELENBQUMsRUFsQ00sR0FBRyxLQUFILEdBQUcsUUFrQ1QifQ==,bW9kdWxlIEZvby5CYXIgewogICAgInVzZSBzdHJpY3QiOwoKICAgIGNsYXNzIEdyZWV0ZXIgewogICAgICAgIGNvbnN0cnVjdG9yKHB1YmxpYyBncmVldGluZzogc3RyaW5nKSB7CiAgICAgICAgfQoKICAgICAgICBncmVldCgpIHsKICAgICAgICAgICAgcmV0dXJuICI8aDE+IiArIHRoaXMuZ3JlZXRpbmcgKyAiPC9oMT4iOwogICAgICAgIH0KICAgIH0KCgogICAgZnVuY3Rpb24gZm9vKGdyZWV0aW5nOiBzdHJpbmcpOiBGb28uQmFyLkdyZWV0ZXIgewogICAgICAgIHJldHVybiBuZXcgR3JlZXRlcihncmVldGluZyk7CiAgICB9CgogICAgdmFyIGdyZWV0ZXIgPSBuZXcgR3JlZXRlcigiSGVsbG8sIHdvcmxkISIpOwogICAgdmFyIHN0ciA9IGdyZWV0ZXIuZ3JlZXQoKTsKCiAgICBmdW5jdGlvbiBmb28yKGdyZWV0aW5nOiBzdHJpbmcsIC4uLnJlc3RHcmVldGluZ3M6IHN0cmluZ1tdKSB7CiAgICAgICAgdmFyIGdyZWV0ZXJzOiBHcmVldGVyW10gPSBbXTsKICAgICAgICBncmVldGVyc1swXSA9IG5ldyBHcmVldGVyKGdyZWV0aW5nKTsKICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHJlc3RHcmVldGluZ3MubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgZ3JlZXRlcnMucHVzaChuZXcgR3JlZXRlcihyZXN0R3JlZXRpbmdzW2ldKSk7CiAgICAgICAgfQoKICAgICAgICByZXR1cm4gZ3JlZXRlcnM7CiAgICB9CgogICAgdmFyIGIgPSBmb28yKCJIZWxsbyIsICJXb3JsZCIsICIhIik7CiAgICBmb3IgKHZhciBqID0gMDsgaiA8IGIubGVuZ3RoOyBqKyspIHsKICAgICAgICBiW2pdLmdyZWV0KCk7CiAgICB9Cn0= +{"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;QACV,YAAY,CAAC;QAEb;YACI,iBAAmB,QAAgB;gBAAhB,aAAQ,GAAR,QAAQ,CAAQ;YACnC,CAAC;YAED,uBAAK,GAAL;gBACI,OAAO,MAAM,GAAG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;YAC5C,CAAC;YACL,cAAC;QAAD,CAAC,AAPD,IAOC;QAGD,SAAS,GAAG,CAAC,QAAgB;YACzB,OAAO,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,SAAS,IAAI,CAAC,QAAgB;YAC1B,IAAI,QAAQ,GAAc,EAAE,CAAC;YAC7B,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;YAFR,uBAA0B;iBAA1B,UAA0B,EAA1B,qBAA0B,EAA1B,IAA0B;gBAA1B,sCAA0B;;YAGtD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC3C,QAAQ,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aAChD;YAED,OAAO,QAAQ,CAAC;QACpB,CAAC;QAED,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QACpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC/B,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;SAChB;IACL,CAAC,EAlCU,GAAG,GAAH,OAAG,KAAH,OAAG,QAkCb;AAAD,CAAC,EAlCM,GAAG,KAAH,GAAG,QAkCT"} +//// https://sokra.github.io/source-map-visualization#base64,dmFyIEZvbzsNCihmdW5jdGlvbiAoRm9vKSB7DQogICAgdmFyIEJhcjsNCiAgICAoZnVuY3Rpb24gKEJhcikgew0KICAgICAgICAidXNlIHN0cmljdCI7DQogICAgICAgIHZhciBHcmVldGVyID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKCkgew0KICAgICAgICAgICAgZnVuY3Rpb24gR3JlZXRlcihncmVldGluZykgew0KICAgICAgICAgICAgICAgIHRoaXMuZ3JlZXRpbmcgPSBncmVldGluZzsNCiAgICAgICAgICAgIH0NCiAgICAgICAgICAgIEdyZWV0ZXIucHJvdG90eXBlLmdyZWV0ID0gZnVuY3Rpb24gKCkgew0KICAgICAgICAgICAgICAgIHJldHVybiAiPGgxPiIgKyB0aGlzLmdyZWV0aW5nICsgIjwvaDE+IjsNCiAgICAgICAgICAgIH07DQogICAgICAgICAgICByZXR1cm4gR3JlZXRlcjsNCiAgICAgICAgfSgpKTsNCiAgICAgICAgZnVuY3Rpb24gZm9vKGdyZWV0aW5nKSB7DQogICAgICAgICAgICByZXR1cm4gbmV3IEdyZWV0ZXIoZ3JlZXRpbmcpOw0KICAgICAgICB9DQogICAgICAgIHZhciBncmVldGVyID0gbmV3IEdyZWV0ZXIoIkhlbGxvLCB3b3JsZCEiKTsNCiAgICAgICAgdmFyIHN0ciA9IGdyZWV0ZXIuZ3JlZXQoKTsNCiAgICAgICAgZnVuY3Rpb24gZm9vMihncmVldGluZykgew0KICAgICAgICAgICAgdmFyIGdyZWV0ZXJzID0gW107DQogICAgICAgICAgICBncmVldGVyc1swXSA9IG5ldyBHcmVldGVyKGdyZWV0aW5nKTsNCiAgICAgICAgICAgIHZhciByZXN0R3JlZXRpbmdzID0gW107DQogICAgICAgICAgICBmb3IgKHZhciBfaSA9IDE7IF9pIDwgYXJndW1lbnRzLmxlbmd0aDsgX2krKykgew0KICAgICAgICAgICAgICAgIHJlc3RHcmVldGluZ3NbX2kgLSAxXSA9IGFyZ3VtZW50c1tfaV07DQogICAgICAgICAgICB9DQogICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHJlc3RHcmVldGluZ3MubGVuZ3RoOyBpKyspIHsNCiAgICAgICAgICAgICAgICBncmVldGVycy5wdXNoKG5ldyBHcmVldGVyKHJlc3RHcmVldGluZ3NbaV0pKTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgICAgIHJldHVybiBncmVldGVyczsNCiAgICAgICAgfQ0KICAgICAgICB2YXIgYiA9IGZvbzIoIkhlbGxvIiwgIldvcmxkIiwgIiEiKTsNCiAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBiLmxlbmd0aDsgaisrKSB7DQogICAgICAgICAgICBiW2pdLmdyZWV0KCk7DQogICAgICAgIH0NCiAgICB9KShCYXIgPSBGb28uQmFyIHx8IChGb28uQmFyID0ge30pKTsNCn0pKEZvbyB8fCAoRm9vID0ge30pKTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPXNvdXJjZU1hcFNhbXBsZS5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlTWFwU2FtcGxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic291cmNlTWFwU2FtcGxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLElBQU8sR0FBRyxDQWtDVDtBQWxDRCxXQUFPLEdBQUc7SUFBQyxJQUFBLEdBQUcsQ0FrQ2I7SUFsQ1UsV0FBQSxHQUFHO1FBQ1YsWUFBWSxDQUFDO1FBRWI7WUFDSSxpQkFBbUIsUUFBZ0I7Z0JBQWhCLGFBQVEsR0FBUixRQUFRLENBQVE7WUFDbkMsQ0FBQztZQUVELHVCQUFLLEdBQUw7Z0JBQ0ksT0FBTyxNQUFNLEdBQUcsSUFBSSxDQUFDLFFBQVEsR0FBRyxPQUFPLENBQUM7WUFDNUMsQ0FBQztZQUNMLGNBQUM7UUFBRCxDQUFDLEFBUEQsSUFPQztRQUdELFNBQVMsR0FBRyxDQUFDLFFBQWdCO1lBQ3pCLE9BQU8sSUFBSSxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUM7UUFDakMsQ0FBQztRQUVELElBQUksT0FBTyxHQUFHLElBQUksT0FBTyxDQUFDLGVBQWUsQ0FBQyxDQUFDO1FBQzNDLElBQUksR0FBRyxHQUFHLE9BQU8sQ0FBQyxLQUFLLEVBQUUsQ0FBQztRQUUxQixTQUFTLElBQUksQ0FBQyxRQUFnQjtZQUMxQixJQUFJLFFBQVEsR0FBYyxFQUFFLENBQUM7WUFDN0IsUUFBUSxDQUFDLENBQUMsQ0FBQyxHQUFHLElBQUksT0FBTyxDQUFDLFFBQVEsQ0FBQyxDQUFDO1lBRlIsdUJBQTBCO2lCQUExQixVQUEwQixFQUExQixxQkFBMEIsRUFBMUIsSUFBMEI7Z0JBQTFCLHNDQUEwQjs7WUFHdEQsS0FBSyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLGFBQWEsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxFQUFFLEVBQUU7Z0JBQzNDLFFBQVEsQ0FBQyxJQUFJLENBQUMsSUFBSSxPQUFPLENBQUMsYUFBYSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQzthQUNoRDtZQUVELE9BQU8sUUFBUSxDQUFDO1FBQ3BCLENBQUM7UUFFRCxJQUFJLENBQUMsR0FBRyxJQUFJLENBQUMsT0FBTyxFQUFFLE9BQU8sRUFBRSxHQUFHLENBQUMsQ0FBQztRQUNwQyxLQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsQ0FBQyxDQUFDLE1BQU0sRUFBRSxDQUFDLEVBQUUsRUFBRTtZQUMvQixDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsS0FBSyxFQUFFLENBQUM7U0FDaEI7SUFDTCxDQUFDLEVBbENVLEdBQUcsR0FBSCxPQUFHLEtBQUgsT0FBRyxRQWtDYjtBQUFELENBQUMsRUFsQ00sR0FBRyxLQUFILEdBQUcsUUFrQ1QifQ==,bW9kdWxlIEZvby5CYXIgewogICAgInVzZSBzdHJpY3QiOwoKICAgIGNsYXNzIEdyZWV0ZXIgewogICAgICAgIGNvbnN0cnVjdG9yKHB1YmxpYyBncmVldGluZzogc3RyaW5nKSB7CiAgICAgICAgfQoKICAgICAgICBncmVldCgpIHsKICAgICAgICAgICAgcmV0dXJuICI8aDE+IiArIHRoaXMuZ3JlZXRpbmcgKyAiPC9oMT4iOwogICAgICAgIH0KICAgIH0KCgogICAgZnVuY3Rpb24gZm9vKGdyZWV0aW5nOiBzdHJpbmcpOiBGb28uQmFyLkdyZWV0ZXIgewogICAgICAgIHJldHVybiBuZXcgR3JlZXRlcihncmVldGluZyk7CiAgICB9CgogICAgdmFyIGdyZWV0ZXIgPSBuZXcgR3JlZXRlcigiSGVsbG8sIHdvcmxkISIpOwogICAgdmFyIHN0ciA9IGdyZWV0ZXIuZ3JlZXQoKTsKCiAgICBmdW5jdGlvbiBmb28yKGdyZWV0aW5nOiBzdHJpbmcsIC4uLnJlc3RHcmVldGluZ3M6IHN0cmluZ1tdKSB7CiAgICAgICAgdmFyIGdyZWV0ZXJzOiBHcmVldGVyW10gPSBbXTsKICAgICAgICBncmVldGVyc1swXSA9IG5ldyBHcmVldGVyKGdyZWV0aW5nKTsKICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHJlc3RHcmVldGluZ3MubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgZ3JlZXRlcnMucHVzaChuZXcgR3JlZXRlcihyZXN0R3JlZXRpbmdzW2ldKSk7CiAgICAgICAgfQoKICAgICAgICByZXR1cm4gZ3JlZXRlcnM7CiAgICB9CgogICAgdmFyIGIgPSBmb28yKCJIZWxsbyIsICJXb3JsZCIsICIhIik7CiAgICBmb3IgKHZhciBqID0gMDsgaiA8IGIubGVuZ3RoOyBqKyspIHsKICAgICAgICBiW2pdLmdyZWV0KCk7CiAgICB9Cn0= diff --git a/tests/baselines/reference/sourceMapSample.sourcemap.txt b/tests/baselines/reference/sourceMapSample.sourcemap.txt index 2266abdd5af8e..f8cc617a5ae3f 100644 --- a/tests/baselines/reference/sourceMapSample.sourcemap.txt +++ b/tests/baselines/reference/sourceMapSample.sourcemap.txt @@ -406,7 +406,7 @@ sourceFile:sourceMapSample.ts 3 > ^^^^ 4 > ^ 5 > ^^^^^^^^ -6 > ^^^^^^-> +6 > ^-> 1 > > > @@ -420,65 +420,27 @@ sourceFile:sourceMapSample.ts 4 >Emitted(20, 23) Source(21, 19) + SourceIndex(0) 5 >Emitted(20, 31) Source(21, 35) + SourceIndex(0) --- ->>> var restGreetings = []; -1->^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> -1->, -2 > ...restGreetings: string[] -1->Emitted(21, 13) Source(21, 37) + SourceIndex(0) -2 >Emitted(21, 36) Source(21, 63) + SourceIndex(0) ---- ->>> for (var _i = 1; _i < arguments.length; _i++) { -1->^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...restGreetings: string[] -3 > -4 > ...restGreetings: string[] -5 > -6 > ...restGreetings: string[] -1->Emitted(22, 18) Source(21, 37) + SourceIndex(0) -2 >Emitted(22, 28) Source(21, 63) + SourceIndex(0) -3 >Emitted(22, 30) Source(21, 37) + SourceIndex(0) -4 >Emitted(22, 51) Source(21, 63) + SourceIndex(0) -5 >Emitted(22, 53) Source(21, 37) + SourceIndex(0) -6 >Emitted(22, 57) Source(21, 63) + SourceIndex(0) ---- ->>> restGreetings[_i - 1] = arguments[_i]; -1 >^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...restGreetings: string[] -1 >Emitted(23, 17) Source(21, 37) + SourceIndex(0) -2 >Emitted(23, 55) Source(21, 63) + SourceIndex(0) ---- ->>> } >>> var greeters = []; -1 >^^^^^^^^^^^^ +1->^^^^^^^^^^^^ 2 > ^^^^ 3 > ^^^^^^^^ 4 > ^^^ 5 > ^^ 6 > ^ 7 > ^^^^^^^^^^^^^^^^^^^-> -1 >) { +1->, ...restGreetings: string[]) { > 2 > var 3 > greeters 4 > : Greeter[] = 5 > [] 6 > ; -1 >Emitted(25, 13) Source(22, 9) + SourceIndex(0) -2 >Emitted(25, 17) Source(22, 13) + SourceIndex(0) -3 >Emitted(25, 25) Source(22, 21) + SourceIndex(0) -4 >Emitted(25, 28) Source(22, 35) + SourceIndex(0) -5 >Emitted(25, 30) Source(22, 37) + SourceIndex(0) -6 >Emitted(25, 31) Source(22, 38) + SourceIndex(0) +1->Emitted(21, 13) Source(22, 9) + SourceIndex(0) +2 >Emitted(21, 17) Source(22, 13) + SourceIndex(0) +3 >Emitted(21, 25) Source(22, 21) + SourceIndex(0) +4 >Emitted(21, 28) Source(22, 35) + SourceIndex(0) +5 >Emitted(21, 30) Source(22, 37) + SourceIndex(0) +6 >Emitted(21, 31) Source(22, 38) + SourceIndex(0) --- >>> greeters[0] = new Greeter(greeting); 1->^^^^^^^^^^^^ @@ -493,7 +455,6 @@ sourceFile:sourceMapSample.ts 10> ^^^^^^^^ 11> ^ 12> ^ -13> ^^^^^^^^^^^^^-> 1-> > 2 > greeters @@ -507,21 +468,59 @@ sourceFile:sourceMapSample.ts 10> greeting 11> ) 12> ; -1->Emitted(26, 13) Source(23, 9) + SourceIndex(0) -2 >Emitted(26, 21) Source(23, 17) + SourceIndex(0) -3 >Emitted(26, 22) Source(23, 18) + SourceIndex(0) -4 >Emitted(26, 23) Source(23, 19) + SourceIndex(0) -5 >Emitted(26, 24) Source(23, 20) + SourceIndex(0) -6 >Emitted(26, 27) Source(23, 23) + SourceIndex(0) -7 >Emitted(26, 31) Source(23, 27) + SourceIndex(0) -8 >Emitted(26, 38) Source(23, 34) + SourceIndex(0) -9 >Emitted(26, 39) Source(23, 35) + SourceIndex(0) -10>Emitted(26, 47) Source(23, 43) + SourceIndex(0) -11>Emitted(26, 48) Source(23, 44) + SourceIndex(0) -12>Emitted(26, 49) Source(23, 45) + SourceIndex(0) +1->Emitted(22, 13) Source(23, 9) + SourceIndex(0) +2 >Emitted(22, 21) Source(23, 17) + SourceIndex(0) +3 >Emitted(22, 22) Source(23, 18) + SourceIndex(0) +4 >Emitted(22, 23) Source(23, 19) + SourceIndex(0) +5 >Emitted(22, 24) Source(23, 20) + SourceIndex(0) +6 >Emitted(22, 27) Source(23, 23) + SourceIndex(0) +7 >Emitted(22, 31) Source(23, 27) + SourceIndex(0) +8 >Emitted(22, 38) Source(23, 34) + SourceIndex(0) +9 >Emitted(22, 39) Source(23, 35) + SourceIndex(0) +10>Emitted(22, 47) Source(23, 43) + SourceIndex(0) +11>Emitted(22, 48) Source(23, 44) + SourceIndex(0) +12>Emitted(22, 49) Source(23, 45) + SourceIndex(0) +--- +>>> var restGreetings = []; +1 >^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 > ...restGreetings: string[] +1 >Emitted(23, 13) Source(21, 37) + SourceIndex(0) +2 >Emitted(23, 36) Source(21, 63) + SourceIndex(0) --- +>>> for (var _i = 1; _i < arguments.length; _i++) { +1->^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^ +1-> +2 > ...restGreetings: string[] +3 > +4 > ...restGreetings: string[] +5 > +6 > ...restGreetings: string[] +1->Emitted(24, 18) Source(21, 37) + SourceIndex(0) +2 >Emitted(24, 28) Source(21, 63) + SourceIndex(0) +3 >Emitted(24, 30) Source(21, 37) + SourceIndex(0) +4 >Emitted(24, 51) Source(21, 63) + SourceIndex(0) +5 >Emitted(24, 53) Source(21, 37) + SourceIndex(0) +6 >Emitted(24, 57) Source(21, 63) + SourceIndex(0) +--- +>>> restGreetings[_i - 1] = arguments[_i]; +1 >^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > ...restGreetings: string[] +1 >Emitted(25, 17) Source(21, 37) + SourceIndex(0) +2 >Emitted(25, 55) Source(21, 63) + SourceIndex(0) +--- +>>> } >>> for (var i = 0; i < restGreetings.length; i++) { -1->^^^^^^^^^^^^ +1 >^^^^^^^^^^^^ 2 > ^^^^^ 3 > ^^^^ 4 > ^ @@ -538,7 +537,9 @@ sourceFile:sourceMapSample.ts 15> ^^ 16> ^^ 17> ^^^-> -1-> +1 >) { + > var greeters: Greeter[] = []; + > greeters[0] = new Greeter(greeting); > 2 > for ( 3 > var @@ -555,7 +556,7 @@ sourceFile:sourceMapSample.ts 14> i 15> ++ 16> ) -1->Emitted(27, 13) Source(24, 9) + SourceIndex(0) +1 >Emitted(27, 13) Source(24, 9) + SourceIndex(0) 2 >Emitted(27, 18) Source(24, 14) + SourceIndex(0) 3 >Emitted(27, 22) Source(24, 18) + SourceIndex(0) 4 >Emitted(27, 23) Source(24, 19) + SourceIndex(0) diff --git a/tests/baselines/reference/sourceMapValidationClasses.js b/tests/baselines/reference/sourceMapValidationClasses.js index b9c3fcdc4316f..e6a380446e9e3 100644 --- a/tests/baselines/reference/sourceMapValidationClasses.js +++ b/tests/baselines/reference/sourceMapValidationClasses.js @@ -57,12 +57,12 @@ var Foo; var greeter = new Greeter("Hello, world!"); var str = greeter.greet(); function foo2(greeting) { + var greeters = []; /* inline block comment */ + greeters[0] = new Greeter(greeting); var restGreetings /* more greeting */ = []; for (var _i = 1; _i < arguments.length; _i++) { restGreetings[_i - 1] = arguments[_i]; } - var greeters = []; /* inline block comment */ - greeters[0] = new Greeter(greeting); for (var i = 0; i < restGreetings.length; i++) { greeters.push(new Greeter(restGreetings[i])); } diff --git a/tests/baselines/reference/sourceMapValidationClasses.js.map b/tests/baselines/reference/sourceMapValidationClasses.js.map index b94a6dc9ced88..b3fe2fd1d0593 100644 --- a/tests/baselines/reference/sourceMapValidationClasses.js.map +++ b/tests/baselines/reference/sourceMapValidationClasses.js.map @@ -1,3 +1,3 @@ //// [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;QACV,YAAY,CAAC;QAEb;YACI,iBAAmB,QAAgB;gBAAhB,aAAQ,GAAR,QAAQ,CAAQ;YACnC,CAAC;YAED,uBAAK,GAAL;gBACI,OAAO,MAAM,GAAG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;YAC5C,CAAC;YACL,cAAC;QAAD,CAAC,AAPD,IAOC;QAGD,SAAS,GAAG,CAAC,QAAgB;YACzB,OAAO,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,SAAS,IAAI,CAAC,QAAgB;YAAE,kBAAiB,mBAAmB,MAAU;iBAA9C,UAA8C,EAA9C,qBAA8C,EAA9C,IAA8C;gBAA9C,sCAA8C;;YAC1E,IAAI,QAAQ,GAAc,EAAE,CAAC,CAAC,0BAA0B;YACxD,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;YACpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC3C,QAAQ,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aAChD;YAED,OAAO,QAAQ,CAAC;QACpB,CAAC;QAED,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QACpC,qCAAqC;QACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC/B,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;SAChB;IACL,CAAC,EAnCU,GAAG,GAAH,OAAG,KAAH,OAAG,QAmCb;AAAD,CAAC,EAnCM,GAAG,KAAH,GAAG,QAmCT"} -//// https://sokra.github.io/source-map-visualization#base64,dmFyIEZvbzsNCihmdW5jdGlvbiAoRm9vKSB7DQogICAgdmFyIEJhcjsNCiAgICAoZnVuY3Rpb24gKEJhcikgew0KICAgICAgICAidXNlIHN0cmljdCI7DQogICAgICAgIHZhciBHcmVldGVyID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKCkgew0KICAgICAgICAgICAgZnVuY3Rpb24gR3JlZXRlcihncmVldGluZykgew0KICAgICAgICAgICAgICAgIHRoaXMuZ3JlZXRpbmcgPSBncmVldGluZzsNCiAgICAgICAgICAgIH0NCiAgICAgICAgICAgIEdyZWV0ZXIucHJvdG90eXBlLmdyZWV0ID0gZnVuY3Rpb24gKCkgew0KICAgICAgICAgICAgICAgIHJldHVybiAiPGgxPiIgKyB0aGlzLmdyZWV0aW5nICsgIjwvaDE+IjsNCiAgICAgICAgICAgIH07DQogICAgICAgICAgICByZXR1cm4gR3JlZXRlcjsNCiAgICAgICAgfSgpKTsNCiAgICAgICAgZnVuY3Rpb24gZm9vKGdyZWV0aW5nKSB7DQogICAgICAgICAgICByZXR1cm4gbmV3IEdyZWV0ZXIoZ3JlZXRpbmcpOw0KICAgICAgICB9DQogICAgICAgIHZhciBncmVldGVyID0gbmV3IEdyZWV0ZXIoIkhlbGxvLCB3b3JsZCEiKTsNCiAgICAgICAgdmFyIHN0ciA9IGdyZWV0ZXIuZ3JlZXQoKTsNCiAgICAgICAgZnVuY3Rpb24gZm9vMihncmVldGluZykgew0KICAgICAgICAgICAgdmFyIHJlc3RHcmVldGluZ3MgLyogbW9yZSBncmVldGluZyAqLyA9IFtdOw0KICAgICAgICAgICAgZm9yICh2YXIgX2kgPSAxOyBfaSA8IGFyZ3VtZW50cy5sZW5ndGg7IF9pKyspIHsNCiAgICAgICAgICAgICAgICByZXN0R3JlZXRpbmdzW19pIC0gMV0gPSBhcmd1bWVudHNbX2ldOw0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgdmFyIGdyZWV0ZXJzID0gW107IC8qIGlubGluZSBibG9jayBjb21tZW50ICovDQogICAgICAgICAgICBncmVldGVyc1swXSA9IG5ldyBHcmVldGVyKGdyZWV0aW5nKTsNCiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcmVzdEdyZWV0aW5ncy5sZW5ndGg7IGkrKykgew0KICAgICAgICAgICAgICAgIGdyZWV0ZXJzLnB1c2gobmV3IEdyZWV0ZXIocmVzdEdyZWV0aW5nc1tpXSkpOw0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgcmV0dXJuIGdyZWV0ZXJzOw0KICAgICAgICB9DQogICAgICAgIHZhciBiID0gZm9vMigiSGVsbG8iLCAiV29ybGQiLCAiISIpOw0KICAgICAgICAvLyBUaGlzIGlzIHNpbXBsZSBzaWdubGUgbGluZSBjb21tZW50DQogICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgYi5sZW5ndGg7IGorKykgew0KICAgICAgICAgICAgYltqXS5ncmVldCgpOw0KICAgICAgICB9DQogICAgfSkoQmFyID0gRm9vLkJhciB8fCAoRm9vLkJhciA9IHt9KSk7DQp9KShGb28gfHwgKEZvbyA9IHt9KSk7DQovLyMgc291cmNlTWFwcGluZ1VSTD1zb3VyY2VNYXBWYWxpZGF0aW9uQ2xhc3Nlcy5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlTWFwVmFsaWRhdGlvbkNsYXNzZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJzb3VyY2VNYXBWYWxpZGF0aW9uQ2xhc3Nlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxJQUFPLEdBQUcsQ0FtQ1Q7QUFuQ0QsV0FBTyxHQUFHO0lBQUMsSUFBQSxHQUFHLENBbUNiO0lBbkNVLFdBQUEsR0FBRztRQUNWLFlBQVksQ0FBQztRQUViO1lBQ0ksaUJBQW1CLFFBQWdCO2dCQUFoQixhQUFRLEdBQVIsUUFBUSxDQUFRO1lBQ25DLENBQUM7WUFFRCx1QkFBSyxHQUFMO2dCQUNJLE9BQU8sTUFBTSxHQUFHLElBQUksQ0FBQyxRQUFRLEdBQUcsT0FBTyxDQUFDO1lBQzVDLENBQUM7WUFDTCxjQUFDO1FBQUQsQ0FBQyxBQVBELElBT0M7UUFHRCxTQUFTLEdBQUcsQ0FBQyxRQUFnQjtZQUN6QixPQUFPLElBQUksT0FBTyxDQUFDLFFBQVEsQ0FBQyxDQUFDO1FBQ2pDLENBQUM7UUFFRCxJQUFJLE9BQU8sR0FBRyxJQUFJLE9BQU8sQ0FBQyxlQUFlLENBQUMsQ0FBQztRQUMzQyxJQUFJLEdBQUcsR0FBRyxPQUFPLENBQUMsS0FBSyxFQUFFLENBQUM7UUFFMUIsU0FBUyxJQUFJLENBQUMsUUFBZ0I7WUFBRSxrQkFBaUIsbUJBQW1CLE1BQVU7aUJBQTlDLFVBQThDLEVBQTlDLHFCQUE4QyxFQUE5QyxJQUE4QztnQkFBOUMsc0NBQThDOztZQUMxRSxJQUFJLFFBQVEsR0FBYyxFQUFFLENBQUMsQ0FBQywwQkFBMEI7WUFDeEQsUUFBUSxDQUFDLENBQUMsQ0FBQyxHQUFHLElBQUksT0FBTyxDQUFDLFFBQVEsQ0FBQyxDQUFDO1lBQ3BDLEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxhQUFhLENBQUMsTUFBTSxFQUFFLENBQUMsRUFBRSxFQUFFO2dCQUMzQyxRQUFRLENBQUMsSUFBSSxDQUFDLElBQUksT0FBTyxDQUFDLGFBQWEsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7YUFDaEQ7WUFFRCxPQUFPLFFBQVEsQ0FBQztRQUNwQixDQUFDO1FBRUQsSUFBSSxDQUFDLEdBQUcsSUFBSSxDQUFDLE9BQU8sRUFBRSxPQUFPLEVBQUUsR0FBRyxDQUFDLENBQUM7UUFDcEMscUNBQXFDO1FBQ3JDLEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxDQUFDLENBQUMsTUFBTSxFQUFFLENBQUMsRUFBRSxFQUFFO1lBQy9CLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQUUsQ0FBQztTQUNoQjtJQUNMLENBQUMsRUFuQ1UsR0FBRyxHQUFILE9BQUcsS0FBSCxPQUFHLFFBbUNiO0FBQUQsQ0FBQyxFQW5DTSxHQUFHLEtBQUgsR0FBRyxRQW1DVCJ9,bW9kdWxlIEZvby5CYXIgewogICAgInVzZSBzdHJpY3QiOwoKICAgIGNsYXNzIEdyZWV0ZXIgewogICAgICAgIGNvbnN0cnVjdG9yKHB1YmxpYyBncmVldGluZzogc3RyaW5nKSB7CiAgICAgICAgfQoKICAgICAgICBncmVldCgpIHsKICAgICAgICAgICAgcmV0dXJuICI8aDE+IiArIHRoaXMuZ3JlZXRpbmcgKyAiPC9oMT4iOwogICAgICAgIH0KICAgIH0KCgogICAgZnVuY3Rpb24gZm9vKGdyZWV0aW5nOiBzdHJpbmcpOiBHcmVldGVyIHsKICAgICAgICByZXR1cm4gbmV3IEdyZWV0ZXIoZ3JlZXRpbmcpOwogICAgfQoKICAgIHZhciBncmVldGVyID0gbmV3IEdyZWV0ZXIoIkhlbGxvLCB3b3JsZCEiKTsKICAgIHZhciBzdHIgPSBncmVldGVyLmdyZWV0KCk7CgogICAgZnVuY3Rpb24gZm9vMihncmVldGluZzogc3RyaW5nLCAuLi5yZXN0R3JlZXRpbmdzIC8qIG1vcmUgZ3JlZXRpbmcgKi86IHN0cmluZ1tdKSB7CiAgICAgICAgdmFyIGdyZWV0ZXJzOiBHcmVldGVyW10gPSBbXTsgLyogaW5saW5lIGJsb2NrIGNvbW1lbnQgKi8KICAgICAgICBncmVldGVyc1swXSA9IG5ldyBHcmVldGVyKGdyZWV0aW5nKTsKICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHJlc3RHcmVldGluZ3MubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgZ3JlZXRlcnMucHVzaChuZXcgR3JlZXRlcihyZXN0R3JlZXRpbmdzW2ldKSk7CiAgICAgICAgfQoKICAgICAgICByZXR1cm4gZ3JlZXRlcnM7CiAgICB9CgogICAgdmFyIGIgPSBmb28yKCJIZWxsbyIsICJXb3JsZCIsICIhIik7CiAgICAvLyBUaGlzIGlzIHNpbXBsZSBzaWdubGUgbGluZSBjb21tZW50CiAgICBmb3IgKHZhciBqID0gMDsgaiA8IGIubGVuZ3RoOyBqKyspIHsKICAgICAgICBiW2pdLmdyZWV0KCk7CiAgICB9Cn0= +{"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;QACV,YAAY,CAAC;QAEb;YACI,iBAAmB,QAAgB;gBAAhB,aAAQ,GAAR,QAAQ,CAAQ;YACnC,CAAC;YAED,uBAAK,GAAL;gBACI,OAAO,MAAM,GAAG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;YAC5C,CAAC;YACL,cAAC;QAAD,CAAC,AAPD,IAOC;QAGD,SAAS,GAAG,CAAC,QAAgB;YACzB,OAAO,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,SAAS,IAAI,CAAC,QAAgB;YAC1B,IAAI,QAAQ,GAAc,EAAE,CAAC,CAAC,0BAA0B;YACxD,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;YAFR,kBAAiB,mBAAmB,MAAU;iBAA9C,UAA8C,EAA9C,qBAA8C,EAA9C,IAA8C;gBAA9C,sCAA8C;;YAG1E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC3C,QAAQ,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aAChD;YAED,OAAO,QAAQ,CAAC;QACpB,CAAC;QAED,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QACpC,qCAAqC;QACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC/B,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;SAChB;IACL,CAAC,EAnCU,GAAG,GAAH,OAAG,KAAH,OAAG,QAmCb;AAAD,CAAC,EAnCM,GAAG,KAAH,GAAG,QAmCT"} +//// https://sokra.github.io/source-map-visualization#base64,dmFyIEZvbzsNCihmdW5jdGlvbiAoRm9vKSB7DQogICAgdmFyIEJhcjsNCiAgICAoZnVuY3Rpb24gKEJhcikgew0KICAgICAgICAidXNlIHN0cmljdCI7DQogICAgICAgIHZhciBHcmVldGVyID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKCkgew0KICAgICAgICAgICAgZnVuY3Rpb24gR3JlZXRlcihncmVldGluZykgew0KICAgICAgICAgICAgICAgIHRoaXMuZ3JlZXRpbmcgPSBncmVldGluZzsNCiAgICAgICAgICAgIH0NCiAgICAgICAgICAgIEdyZWV0ZXIucHJvdG90eXBlLmdyZWV0ID0gZnVuY3Rpb24gKCkgew0KICAgICAgICAgICAgICAgIHJldHVybiAiPGgxPiIgKyB0aGlzLmdyZWV0aW5nICsgIjwvaDE+IjsNCiAgICAgICAgICAgIH07DQogICAgICAgICAgICByZXR1cm4gR3JlZXRlcjsNCiAgICAgICAgfSgpKTsNCiAgICAgICAgZnVuY3Rpb24gZm9vKGdyZWV0aW5nKSB7DQogICAgICAgICAgICByZXR1cm4gbmV3IEdyZWV0ZXIoZ3JlZXRpbmcpOw0KICAgICAgICB9DQogICAgICAgIHZhciBncmVldGVyID0gbmV3IEdyZWV0ZXIoIkhlbGxvLCB3b3JsZCEiKTsNCiAgICAgICAgdmFyIHN0ciA9IGdyZWV0ZXIuZ3JlZXQoKTsNCiAgICAgICAgZnVuY3Rpb24gZm9vMihncmVldGluZykgew0KICAgICAgICAgICAgdmFyIGdyZWV0ZXJzID0gW107IC8qIGlubGluZSBibG9jayBjb21tZW50ICovDQogICAgICAgICAgICBncmVldGVyc1swXSA9IG5ldyBHcmVldGVyKGdyZWV0aW5nKTsNCiAgICAgICAgICAgIHZhciByZXN0R3JlZXRpbmdzIC8qIG1vcmUgZ3JlZXRpbmcgKi8gPSBbXTsNCiAgICAgICAgICAgIGZvciAodmFyIF9pID0gMTsgX2kgPCBhcmd1bWVudHMubGVuZ3RoOyBfaSsrKSB7DQogICAgICAgICAgICAgICAgcmVzdEdyZWV0aW5nc1tfaSAtIDFdID0gYXJndW1lbnRzW19pXTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcmVzdEdyZWV0aW5ncy5sZW5ndGg7IGkrKykgew0KICAgICAgICAgICAgICAgIGdyZWV0ZXJzLnB1c2gobmV3IEdyZWV0ZXIocmVzdEdyZWV0aW5nc1tpXSkpOw0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgcmV0dXJuIGdyZWV0ZXJzOw0KICAgICAgICB9DQogICAgICAgIHZhciBiID0gZm9vMigiSGVsbG8iLCAiV29ybGQiLCAiISIpOw0KICAgICAgICAvLyBUaGlzIGlzIHNpbXBsZSBzaWdubGUgbGluZSBjb21tZW50DQogICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgYi5sZW5ndGg7IGorKykgew0KICAgICAgICAgICAgYltqXS5ncmVldCgpOw0KICAgICAgICB9DQogICAgfSkoQmFyID0gRm9vLkJhciB8fCAoRm9vLkJhciA9IHt9KSk7DQp9KShGb28gfHwgKEZvbyA9IHt9KSk7DQovLyMgc291cmNlTWFwcGluZ1VSTD1zb3VyY2VNYXBWYWxpZGF0aW9uQ2xhc3Nlcy5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlTWFwVmFsaWRhdGlvbkNsYXNzZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJzb3VyY2VNYXBWYWxpZGF0aW9uQ2xhc3Nlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxJQUFPLEdBQUcsQ0FtQ1Q7QUFuQ0QsV0FBTyxHQUFHO0lBQUMsSUFBQSxHQUFHLENBbUNiO0lBbkNVLFdBQUEsR0FBRztRQUNWLFlBQVksQ0FBQztRQUViO1lBQ0ksaUJBQW1CLFFBQWdCO2dCQUFoQixhQUFRLEdBQVIsUUFBUSxDQUFRO1lBQ25DLENBQUM7WUFFRCx1QkFBSyxHQUFMO2dCQUNJLE9BQU8sTUFBTSxHQUFHLElBQUksQ0FBQyxRQUFRLEdBQUcsT0FBTyxDQUFDO1lBQzVDLENBQUM7WUFDTCxjQUFDO1FBQUQsQ0FBQyxBQVBELElBT0M7UUFHRCxTQUFTLEdBQUcsQ0FBQyxRQUFnQjtZQUN6QixPQUFPLElBQUksT0FBTyxDQUFDLFFBQVEsQ0FBQyxDQUFDO1FBQ2pDLENBQUM7UUFFRCxJQUFJLE9BQU8sR0FBRyxJQUFJLE9BQU8sQ0FBQyxlQUFlLENBQUMsQ0FBQztRQUMzQyxJQUFJLEdBQUcsR0FBRyxPQUFPLENBQUMsS0FBSyxFQUFFLENBQUM7UUFFMUIsU0FBUyxJQUFJLENBQUMsUUFBZ0I7WUFDMUIsSUFBSSxRQUFRLEdBQWMsRUFBRSxDQUFDLENBQUMsMEJBQTBCO1lBQ3hELFFBQVEsQ0FBQyxDQUFDLENBQUMsR0FBRyxJQUFJLE9BQU8sQ0FBQyxRQUFRLENBQUMsQ0FBQztZQUZSLGtCQUFpQixtQkFBbUIsTUFBVTtpQkFBOUMsVUFBOEMsRUFBOUMscUJBQThDLEVBQTlDLElBQThDO2dCQUE5QyxzQ0FBOEM7O1lBRzFFLEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxhQUFhLENBQUMsTUFBTSxFQUFFLENBQUMsRUFBRSxFQUFFO2dCQUMzQyxRQUFRLENBQUMsSUFBSSxDQUFDLElBQUksT0FBTyxDQUFDLGFBQWEsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7YUFDaEQ7WUFFRCxPQUFPLFFBQVEsQ0FBQztRQUNwQixDQUFDO1FBRUQsSUFBSSxDQUFDLEdBQUcsSUFBSSxDQUFDLE9BQU8sRUFBRSxPQUFPLEVBQUUsR0FBRyxDQUFDLENBQUM7UUFDcEMscUNBQXFDO1FBQ3JDLEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxDQUFDLENBQUMsTUFBTSxFQUFFLENBQUMsRUFBRSxFQUFFO1lBQy9CLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQUUsQ0FBQztTQUNoQjtJQUNMLENBQUMsRUFuQ1UsR0FBRyxHQUFILE9BQUcsS0FBSCxPQUFHLFFBbUNiO0FBQUQsQ0FBQyxFQW5DTSxHQUFHLEtBQUgsR0FBRyxRQW1DVCJ9,bW9kdWxlIEZvby5CYXIgewogICAgInVzZSBzdHJpY3QiOwoKICAgIGNsYXNzIEdyZWV0ZXIgewogICAgICAgIGNvbnN0cnVjdG9yKHB1YmxpYyBncmVldGluZzogc3RyaW5nKSB7CiAgICAgICAgfQoKICAgICAgICBncmVldCgpIHsKICAgICAgICAgICAgcmV0dXJuICI8aDE+IiArIHRoaXMuZ3JlZXRpbmcgKyAiPC9oMT4iOwogICAgICAgIH0KICAgIH0KCgogICAgZnVuY3Rpb24gZm9vKGdyZWV0aW5nOiBzdHJpbmcpOiBHcmVldGVyIHsKICAgICAgICByZXR1cm4gbmV3IEdyZWV0ZXIoZ3JlZXRpbmcpOwogICAgfQoKICAgIHZhciBncmVldGVyID0gbmV3IEdyZWV0ZXIoIkhlbGxvLCB3b3JsZCEiKTsKICAgIHZhciBzdHIgPSBncmVldGVyLmdyZWV0KCk7CgogICAgZnVuY3Rpb24gZm9vMihncmVldGluZzogc3RyaW5nLCAuLi5yZXN0R3JlZXRpbmdzIC8qIG1vcmUgZ3JlZXRpbmcgKi86IHN0cmluZ1tdKSB7CiAgICAgICAgdmFyIGdyZWV0ZXJzOiBHcmVldGVyW10gPSBbXTsgLyogaW5saW5lIGJsb2NrIGNvbW1lbnQgKi8KICAgICAgICBncmVldGVyc1swXSA9IG5ldyBHcmVldGVyKGdyZWV0aW5nKTsKICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHJlc3RHcmVldGluZ3MubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgZ3JlZXRlcnMucHVzaChuZXcgR3JlZXRlcihyZXN0R3JlZXRpbmdzW2ldKSk7CiAgICAgICAgfQoKICAgICAgICByZXR1cm4gZ3JlZXRlcnM7CiAgICB9CgogICAgdmFyIGIgPSBmb28yKCJIZWxsbyIsICJXb3JsZCIsICIhIik7CiAgICAvLyBUaGlzIGlzIHNpbXBsZSBzaWdubGUgbGluZSBjb21tZW50CiAgICBmb3IgKHZhciBqID0gMDsgaiA8IGIubGVuZ3RoOyBqKyspIHsKICAgICAgICBiW2pdLmdyZWV0KCk7CiAgICB9Cn0= diff --git a/tests/baselines/reference/sourceMapValidationClasses.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClasses.sourcemap.txt index 2ba546aa2df45..61d4f626ce891 100644 --- a/tests/baselines/reference/sourceMapValidationClasses.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClasses.sourcemap.txt @@ -408,7 +408,7 @@ sourceFile:sourceMapValidationClasses.ts 3 > ^^^^ 4 > ^ 5 > ^^^^^^^^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > > @@ -422,52 +422,8 @@ sourceFile:sourceMapValidationClasses.ts 4 >Emitted(20, 23) Source(21, 19) + SourceIndex(0) 5 >Emitted(20, 31) Source(21, 35) + SourceIndex(0) --- ->>> var restGreetings /* more greeting */ = []; -1->^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^ -4 > ^^^^^^ -5 > ^^^^^-> -1->, -2 > ...restGreetings -3 > /* more greeting */ -4 > : string[] -1->Emitted(21, 13) Source(21, 37) + SourceIndex(0) -2 >Emitted(21, 31) Source(21, 54) + SourceIndex(0) -3 >Emitted(21, 50) Source(21, 73) + SourceIndex(0) -4 >Emitted(21, 56) Source(21, 83) + SourceIndex(0) ---- ->>> for (var _i = 1; _i < arguments.length; _i++) { -1->^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^ -5 > ^^ -6 > ^^^^ -1-> -2 > ...restGreetings /* more greeting */: string[] -3 > -4 > ...restGreetings /* more greeting */: string[] -5 > -6 > ...restGreetings /* more greeting */: string[] -1->Emitted(22, 18) Source(21, 37) + SourceIndex(0) -2 >Emitted(22, 28) Source(21, 83) + SourceIndex(0) -3 >Emitted(22, 30) Source(21, 37) + SourceIndex(0) -4 >Emitted(22, 51) Source(21, 83) + SourceIndex(0) -5 >Emitted(22, 53) Source(21, 37) + SourceIndex(0) -6 >Emitted(22, 57) Source(21, 83) + SourceIndex(0) ---- ->>> restGreetings[_i - 1] = arguments[_i]; -1 >^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 > ...restGreetings /* more greeting */: string[] -1 >Emitted(23, 17) Source(21, 37) + SourceIndex(0) -2 >Emitted(23, 55) Source(21, 83) + SourceIndex(0) ---- ->>> } >>> var greeters = []; /* inline block comment */ -1 >^^^^^^^^^^^^ +1->^^^^^^^^^^^^ 2 > ^^^^ 3 > ^^^^^^^^ 4 > ^^^ @@ -475,7 +431,7 @@ sourceFile:sourceMapValidationClasses.ts 6 > ^ 7 > ^ 8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ -1 >) { +1->, ...restGreetings /* more greeting */: string[]) { > 2 > var 3 > greeters @@ -484,14 +440,14 @@ sourceFile:sourceMapValidationClasses.ts 6 > ; 7 > 8 > /* inline block comment */ -1 >Emitted(25, 13) Source(22, 9) + SourceIndex(0) -2 >Emitted(25, 17) Source(22, 13) + SourceIndex(0) -3 >Emitted(25, 25) Source(22, 21) + SourceIndex(0) -4 >Emitted(25, 28) Source(22, 35) + SourceIndex(0) -5 >Emitted(25, 30) Source(22, 37) + SourceIndex(0) -6 >Emitted(25, 31) Source(22, 38) + SourceIndex(0) -7 >Emitted(25, 32) Source(22, 39) + SourceIndex(0) -8 >Emitted(25, 58) Source(22, 65) + SourceIndex(0) +1->Emitted(21, 13) Source(22, 9) + SourceIndex(0) +2 >Emitted(21, 17) Source(22, 13) + SourceIndex(0) +3 >Emitted(21, 25) Source(22, 21) + SourceIndex(0) +4 >Emitted(21, 28) Source(22, 35) + SourceIndex(0) +5 >Emitted(21, 30) Source(22, 37) + SourceIndex(0) +6 >Emitted(21, 31) Source(22, 38) + SourceIndex(0) +7 >Emitted(21, 32) Source(22, 39) + SourceIndex(0) +8 >Emitted(21, 58) Source(22, 65) + SourceIndex(0) --- >>> greeters[0] = new Greeter(greeting); 1 >^^^^^^^^^^^^ @@ -506,7 +462,7 @@ sourceFile:sourceMapValidationClasses.ts 10> ^^^^^^^^ 11> ^ 12> ^ -13> ^^^^^^^^^^^^^-> +13> ^^^^^^^^-> 1 > > 2 > greeters @@ -520,21 +476,65 @@ sourceFile:sourceMapValidationClasses.ts 10> greeting 11> ) 12> ; -1 >Emitted(26, 13) Source(23, 9) + SourceIndex(0) -2 >Emitted(26, 21) Source(23, 17) + SourceIndex(0) -3 >Emitted(26, 22) Source(23, 18) + SourceIndex(0) -4 >Emitted(26, 23) Source(23, 19) + SourceIndex(0) -5 >Emitted(26, 24) Source(23, 20) + SourceIndex(0) -6 >Emitted(26, 27) Source(23, 23) + SourceIndex(0) -7 >Emitted(26, 31) Source(23, 27) + SourceIndex(0) -8 >Emitted(26, 38) Source(23, 34) + SourceIndex(0) -9 >Emitted(26, 39) Source(23, 35) + SourceIndex(0) -10>Emitted(26, 47) Source(23, 43) + SourceIndex(0) -11>Emitted(26, 48) Source(23, 44) + SourceIndex(0) -12>Emitted(26, 49) Source(23, 45) + SourceIndex(0) +1 >Emitted(22, 13) Source(23, 9) + SourceIndex(0) +2 >Emitted(22, 21) Source(23, 17) + SourceIndex(0) +3 >Emitted(22, 22) Source(23, 18) + SourceIndex(0) +4 >Emitted(22, 23) Source(23, 19) + SourceIndex(0) +5 >Emitted(22, 24) Source(23, 20) + SourceIndex(0) +6 >Emitted(22, 27) Source(23, 23) + SourceIndex(0) +7 >Emitted(22, 31) Source(23, 27) + SourceIndex(0) +8 >Emitted(22, 38) Source(23, 34) + SourceIndex(0) +9 >Emitted(22, 39) Source(23, 35) + SourceIndex(0) +10>Emitted(22, 47) Source(23, 43) + SourceIndex(0) +11>Emitted(22, 48) Source(23, 44) + SourceIndex(0) +12>Emitted(22, 49) Source(23, 45) + SourceIndex(0) --- ->>> for (var i = 0; i < restGreetings.length; i++) { +>>> var restGreetings /* more greeting */ = []; 1->^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^^ +5 > ^^^^^-> +1-> +2 > ...restGreetings +3 > /* more greeting */ +4 > : string[] +1->Emitted(23, 13) Source(21, 37) + SourceIndex(0) +2 >Emitted(23, 31) Source(21, 54) + SourceIndex(0) +3 >Emitted(23, 50) Source(21, 73) + SourceIndex(0) +4 >Emitted(23, 56) Source(21, 83) + SourceIndex(0) +--- +>>> for (var _i = 1; _i < arguments.length; _i++) { +1->^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^ +1-> +2 > ...restGreetings /* more greeting */: string[] +3 > +4 > ...restGreetings /* more greeting */: string[] +5 > +6 > ...restGreetings /* more greeting */: string[] +1->Emitted(24, 18) Source(21, 37) + SourceIndex(0) +2 >Emitted(24, 28) Source(21, 83) + SourceIndex(0) +3 >Emitted(24, 30) Source(21, 37) + SourceIndex(0) +4 >Emitted(24, 51) Source(21, 83) + SourceIndex(0) +5 >Emitted(24, 53) Source(21, 37) + SourceIndex(0) +6 >Emitted(24, 57) Source(21, 83) + SourceIndex(0) +--- +>>> restGreetings[_i - 1] = arguments[_i]; +1 >^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > ...restGreetings /* more greeting */: string[] +1 >Emitted(25, 17) Source(21, 37) + SourceIndex(0) +2 >Emitted(25, 55) Source(21, 83) + SourceIndex(0) +--- +>>> } +>>> for (var i = 0; i < restGreetings.length; i++) { +1 >^^^^^^^^^^^^ 2 > ^^^^^ 3 > ^^^^ 4 > ^ @@ -551,7 +551,9 @@ sourceFile:sourceMapValidationClasses.ts 15> ^^ 16> ^^ 17> ^^^-> -1-> +1 >) { + > var greeters: Greeter[] = []; /* inline block comment */ + > greeters[0] = new Greeter(greeting); > 2 > for ( 3 > var @@ -568,7 +570,7 @@ sourceFile:sourceMapValidationClasses.ts 14> i 15> ++ 16> ) -1->Emitted(27, 13) Source(24, 9) + SourceIndex(0) +1 >Emitted(27, 13) Source(24, 9) + SourceIndex(0) 2 >Emitted(27, 18) Source(24, 14) + SourceIndex(0) 3 >Emitted(27, 22) Source(24, 18) + SourceIndex(0) 4 >Emitted(27, 23) Source(24, 19) + SourceIndex(0) diff --git a/tests/baselines/reference/vararg.js b/tests/baselines/reference/vararg.js index 20ec2e2f0fbdf..00a386910ad48 100644 --- a/tests/baselines/reference/vararg.js +++ b/tests/baselines/reference/vararg.js @@ -45,11 +45,11 @@ var M; function C() { } C.prototype.f = function (x) { + var sum = 0; var rest = []; for (var _i = 1; _i < arguments.length; _i++) { rest[_i - 1] = arguments[_i]; } - var sum = 0; for (var i = 0; i < rest.length; i++) { sum += rest[i]; } @@ -59,11 +59,11 @@ var M; C.prototype.fnope = function (x) { }; C.prototype.fonly = function () { + builder = ""; var rest = []; for (var _i = 0; _i < arguments.length; _i++) { rest[_i] = arguments[_i]; } - builder = ""; for (var i = 0; i < rest.length; i++) { builder += rest[i]; } diff --git a/tests/cases/conformance/types/rest/genericRestParameters1.ts b/tests/cases/conformance/types/rest/genericRestParameters1.ts index ede07b0d9ac58..cae7b5a35f179 100644 --- a/tests/cases/conformance/types/rest/genericRestParameters1.ts +++ b/tests/cases/conformance/types/rest/genericRestParameters1.ts @@ -1,167 +1,6 @@ // @strict: true // @declaration: true -declare let f1: (...x: [number, string, boolean]) => void; -declare let f2: (x0: number, x1: string, x2: boolean) => void; - -f1 = f2; -f2 = f1; - -declare const t3: [number, string, boolean]; -declare const t2: [string, boolean]; -declare const t1: [boolean]; -declare const t0: []; - -declare const ns: [number, string]; -declare const sn: [string, number]; - -f1(42, "hello", true); -f1(t3[0], t3[1], t3[2]); -f1(...t3); -f1(42, ...t2); -f1(42, "hello", ...t1); -f1(42, "hello", true, ...t0); -f1(ns[0], ns[1], true); -f1(...ns, true); // FIXME: Error, since ...ns is considered as string|number here - -f2(42, "hello", true); -f2(t3[0], t3[1], t3[2]); -f2(...t3); -f2(42, ...t2); -f2(42, "hello", ...t1); -f2(42, "hello", true, ...t0); -f2(ns[0], ns[1], true); -f2(...ns, true); // FIXME: Error, since ...ns is considered as string|number here - -declare function f10(...args: T): T; - -const x10 = f10(42, "hello", true); // [number, string, boolean] -const x11 = f10(42, "hello"); // [number, string] -const x12 = f10(42); // [number] -const x13 = f10(); // [] -const x14 = f10(...t3); // [number, string, boolean] -const x15 = f10(42, ...t2); // [number, string, boolean] -const x16 = f10(42, "hello", ...t1); // [number, string, boolean] -const x17 = f10(42, "hello", true, ...t0); // [number, string, boolean] -const x18 = f10(...ns, true); // (string | number | boolean)[] - -function g10(u: U, v: V) { - let x1 = f10(...u); // U - let x2 = f10(...v); // V - let x3 = f10(1, ...u); // [number, ...string[]] - let x4 = f10(...u, ...v); // (string | number)[] -} - -declare function f11(...args: T): T; - -const z10 = f11(42, "hello", true); // [42, "hello", true] -const z11 = f11(42, "hello"); // [42, "hello"] -const z12 = f11(42); // [42] -const z13 = f11(); // [] -const z14 = f11(...t3); // [number, string, boolean] -const z15 = f11(42, ...t2); // [42, string, boolean] -const z16 = f11(42, "hello", ...t1); // [42, "hello", boolean] -const z17 = f11(42, "hello", true, ...t0); // [42, "hello", true] -const z18 = f11(...ns, true); // (string | number | true)[] - -function g11(u: U, v: V) { - let x1 = f11(...u); // U - let x2 = f11(...v); // V - let x3 = f11(1, ...u); // [1, ...string[]] - let x4 = f11(...u, ...v); // (string | number)[] -} - -function call(f: (...args: T) => U, ...args: T) { - return f(...args); -} - -function callr(args: T, f: (...args: T) => U) { - return f(...args); -} - -declare function f15(a: string, b: number): string | number; -declare function f16(a: A, b: B): A | B; - -let x20 = call((x, y) => x + y, 10, 20); // number -let x21 = call((x, y) => x + y, 10, "hello"); // string -let x22 = call(f15, "hello", 42); // string | number -let x23 = call(f16, "hello", 42); // unknown -let x24 = call<[string, number], string | number>(f16, "hello", 42); // string | number - -let x30 = callr(sn, (x, y) => x + y); // string -let x31 = callr(sn, f15); // string | number -let x32 = callr(sn, f16); // string | number - function bind(f: (x: T, ...rest: U) => V, x: T) { return (...rest: U) => f(x, ...rest); -} - -declare const f20: (x: number, y: string, z: boolean) => string[]; - -const f21 = bind(f20, 42); // (y: string, z: boolean) => string[] -const f22 = bind(f21, "hello"); // (z: boolean) => string[] -const f23 = bind(f22, true); // () => string[] - -f20(42, "hello", true); -f21("hello", true); -f22(true); -f23(); - -declare const g20: (x: number, y?: string, z?: boolean) => string[]; - -const g21 = bind(g20, 42); // (y: string, z: boolean) => string[] -const g22 = bind(g21, "hello"); // (z: boolean) => string[] -const g23 = bind(g22, true); // () => string[] - -g20(42, "hello", true); -g20(42, "hello"); -g20(42); -g21("hello", true); -g21("hello"); -g21(); -g22(true); -g22(); -g23(); - -declare function f30 any)[]>(x: T, ...args: U): U; - -const c30 = f30(42, x => "" + x, x => x + 1); // [(x: number) => string, (x: number) => number] - -type T01 = Parameters<(x: number, y: string, z: boolean) => void>; -type T02 = Parameters<(...args: [number, string, boolean]) => void>; -type T03 = ConstructorParameters void>; -type T04 = ConstructorParameters void>; -type T05 = Parameters<(...args: T[]) => void>; -type T06 = ConstructorParameters void>; -type T07 = Parameters<(...args: T) => void>; -type T08 = ConstructorParameters void>; -type T09 = Parameters; - -type Record1 = { - move: [number, 'left' | 'right']; - jump: [number, 'up' | 'down']; - stop: string; - done: []; -} - -type EventType = { - emit(e: K, ...payload: T[K] extends any[] ? T[K] : [T[K]]): void; -} - -declare var events: EventType; -events.emit('move', 10, 'left'); -events.emit('jump', 20, 'up'); -events.emit('stop', 'Bye!'); -events.emit('done'); - -// Repro from #25871 - -declare var ff1: (... args: any[]) => void; - -declare var ff2: () => void; -declare var ff3: (...args: []) => void; -declare var ff4: (a: never) => void; - -ff1 = ff2; -ff1 = ff3; -ff1 = ff4; // Error +} \ No newline at end of file From 1c1537c400e3a5199b0abf8942a30fa12632266d Mon Sep 17 00:00:00 2001 From: kingwl Date: Mon, 22 Jun 2020 20:53:44 +0800 Subject: [PATCH 4/7] update baseline --- tests/baselines/reference/keyofAndIndexedAccess.js | 8 ++++++-- .../reference/restParameterInDownlevelGenerator.js | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/baselines/reference/keyofAndIndexedAccess.js b/tests/baselines/reference/keyofAndIndexedAccess.js index 2539bab930551..e7b3e094f712f 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.js +++ b/tests/baselines/reference/keyofAndIndexedAccess.js @@ -944,8 +944,12 @@ var OtherPerson = /** @class */ (function () { }()); function path(obj) { var result = obj; - for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { - var k = keys_1[_i]; + var keys = []; + for (var _i = 1; _i < arguments.length; _i++) { + keys[_i - 1] = arguments[_i]; + } + for (var _a = 0, keys_1 = keys; _a < keys_1.length; _a++) { + var k = keys_1[_a]; result = result[k]; } return result; diff --git a/tests/baselines/reference/restParameterInDownlevelGenerator.js b/tests/baselines/reference/restParameterInDownlevelGenerator.js index 90f6994732e8a..3a1dbe6a7ac95 100644 --- a/tests/baselines/reference/restParameterInDownlevelGenerator.js +++ b/tests/baselines/reference/restParameterInDownlevelGenerator.js @@ -7,8 +7,12 @@ function * mergeStringLists(...strings: string[]) { //// [restParameterInDownlevelGenerator.js] // https://github.com/Microsoft/TypeScript/issues/30653 function mergeStringLists() { - var strings_1, strings_1_1, str; + var _i, strings_1, strings_1_1, str; var e_1, _a; + var strings = []; + for (_i = 0; _i < arguments.length; _i++) { + strings[_i] = arguments[_i]; + } return __generator(this, function (_b) { try { for (strings_1 = __values(strings), strings_1_1 = strings_1.next(); !strings_1_1.done; strings_1_1 = strings_1.next()) { From d05a05271cbe794ae4875082771486a37846a7e9 Mon Sep 17 00:00:00 2001 From: kingwl Date: Mon, 22 Jun 2020 21:19:58 +0800 Subject: [PATCH 5/7] fix super call break --- src/compiler/transformers/es2015.ts | 8 +- .../amdDeclarationEmitNoExtraDeclare.js | 4 + .../genericRestParameters1.errors.txt | 190 +++++ .../reference/genericRestParameters1.js | 332 +++++++- .../reference/genericRestParameters1.symbols | 654 ++++++++++++++- .../reference/genericRestParameters1.types | 781 ++++++++++++++++++ .../types/rest/genericRestParameters1.ts | 163 +++- 7 files changed, 2110 insertions(+), 22 deletions(-) create mode 100644 tests/baselines/reference/genericRestParameters1.errors.txt diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index d104e5fb15aed..be209bcdf5793 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -980,12 +980,14 @@ namespace ts { // If the first statement is a call to `super()`, visit the statement directly let superCallExpression: Expression | undefined; + let superCallStatement: Statement | undefined; if (hasSynthesizedSuper) { superCallExpression = createDefaultSuperCallOrThis(); } else if (isDerivedClass && statementOffset < constructor.body.statements.length) { const firstStatement = constructor.body.statements[statementOffset]; if (isExpressionStatement(firstStatement) && isSuperCall(firstStatement.expression)) { + superCallStatement = firstStatement; superCallExpression = visitImmediateSuperCallInBody(firstStatement.expression); } } @@ -997,13 +999,12 @@ namespace ts { // visit the remaining statements addRange(statements, visitNodes(constructor.body.statements, visitor, isStatement, /*start*/ statementOffset)); - addRestParameterIfNeeded(statements, constructor, hasSynthesizedSuper); factory.mergeLexicalEnvironment(prologue, endLexicalEnvironment()); insertCaptureNewTargetIfNeeded(prologue, constructor, /*copyOnWrite*/ false); if (isDerivedClass) { - if (superCallExpression && statementOffset === constructor.body.statements.length && !(constructor.body.transformFlags & TransformFlags.ContainsLexicalThis)) { + if (superCallExpression && superCallStatement && statementOffset === constructor.body.statements.length && !(constructor.body.transformFlags & TransformFlags.ContainsLexicalThis)) { // If the subclass constructor does *not* contain `this` and *ends* with a `super()` call, we will use the // following representation: // @@ -1025,6 +1026,7 @@ namespace ts { // ``` const superCall = cast(cast(superCallExpression, isBinaryExpression).left, isCallExpression); const returnStatement = factory.createReturnStatement(superCallExpression); + setOriginalNode(returnStatement, superCallStatement); setCommentRange(returnStatement, getCommentRange(superCall)); setEmitFlags(superCall, EmitFlags.NoComments); statements.push(returnStatement); @@ -1079,6 +1081,7 @@ namespace ts { insertCaptureThisForNodeIfNeeded(prologue, constructor); } + addRestParameterIfNeeded(statements, constructor, hasSynthesizedSuper); const block = factory.createBlock( setTextRange( factory.createNodeArray( @@ -1355,7 +1358,6 @@ namespace ts { } const firstStatementContainsRestParameter = find(statements, stmt => !!(getOriginalNode(stmt).flags & NodeFlags.ContainsRestParameterReference)); - if (!firstStatementContainsRestParameter && !((getOriginalNode(parameter).flags & NodeFlags.RestParameterMustEmitAtTop))) { return false; } diff --git a/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.js b/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.js index 8d3d1c3fa0638..f8f25a4e1aa86 100644 --- a/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.js +++ b/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.js @@ -43,6 +43,10 @@ define("Configurable", ["require", "exports"], function (require, exports) { return /** @class */ (function (_super) { __extends(class_1, _super); function class_1() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } return _super.apply(this, args) || this; } return class_1; diff --git a/tests/baselines/reference/genericRestParameters1.errors.txt b/tests/baselines/reference/genericRestParameters1.errors.txt new file mode 100644 index 0000000000000..707e86a94dd8f --- /dev/null +++ b/tests/baselines/reference/genericRestParameters1.errors.txt @@ -0,0 +1,190 @@ +tests/cases/conformance/types/rest/genericRestParameters1.ts(22,4): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/rest/genericRestParameters1.ts(31,4): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. + Type 'string' is not assignable to type 'number'. +tests/cases/conformance/types/rest/genericRestParameters1.ts(135,23): error TS2344: Type 'Function' does not satisfy the constraint '(...args: any) => any'. + Type 'Function' provides no match for the signature '(...args: any): any'. +tests/cases/conformance/types/rest/genericRestParameters1.ts(164,1): error TS2322: Type '(a: never) => void' is not assignable to type '(...args: any[]) => void'. + Types of parameters 'a' and 'args' are incompatible. + Type 'any' is not assignable to type 'never'. + + +==== tests/cases/conformance/types/rest/genericRestParameters1.ts (4 errors) ==== + declare let f1: (...x: [number, string, boolean]) => void; + declare let f2: (x0: number, x1: string, x2: boolean) => void; + + f1 = f2; + f2 = f1; + + declare const t3: [number, string, boolean]; + declare const t2: [string, boolean]; + declare const t1: [boolean]; + declare const t0: []; + + declare const ns: [number, string]; + declare const sn: [string, number]; + + f1(42, "hello", true); + f1(t3[0], t3[1], t3[2]); + f1(...t3); + f1(42, ...t2); + f1(42, "hello", ...t1); + f1(42, "hello", true, ...t0); + f1(ns[0], ns[1], true); + f1(...ns, true); // FIXME: Error, since ...ns is considered as string|number here + ~~~~~ +!!! error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. +!!! error TS2345: Type 'string' is not assignable to type 'number'. + + f2(42, "hello", true); + f2(t3[0], t3[1], t3[2]); + f2(...t3); + f2(42, ...t2); + f2(42, "hello", ...t1); + f2(42, "hello", true, ...t0); + f2(ns[0], ns[1], true); + f2(...ns, true); // FIXME: Error, since ...ns is considered as string|number here + ~~~~~ +!!! error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. +!!! error TS2345: Type 'string' is not assignable to type 'number'. + + declare function f10(...args: T): T; + + const x10 = f10(42, "hello", true); // [number, string, boolean] + const x11 = f10(42, "hello"); // [number, string] + const x12 = f10(42); // [number] + const x13 = f10(); // [] + const x14 = f10(...t3); // [number, string, boolean] + const x15 = f10(42, ...t2); // [number, string, boolean] + const x16 = f10(42, "hello", ...t1); // [number, string, boolean] + const x17 = f10(42, "hello", true, ...t0); // [number, string, boolean] + const x18 = f10(...ns, true); // (string | number | boolean)[] + + function g10(u: U, v: V) { + let x1 = f10(...u); // U + let x2 = f10(...v); // V + let x3 = f10(1, ...u); // [number, ...string[]] + let x4 = f10(...u, ...v); // (string | number)[] + } + + declare function f11(...args: T): T; + + const z10 = f11(42, "hello", true); // [42, "hello", true] + const z11 = f11(42, "hello"); // [42, "hello"] + const z12 = f11(42); // [42] + const z13 = f11(); // [] + const z14 = f11(...t3); // [number, string, boolean] + const z15 = f11(42, ...t2); // [42, string, boolean] + const z16 = f11(42, "hello", ...t1); // [42, "hello", boolean] + const z17 = f11(42, "hello", true, ...t0); // [42, "hello", true] + const z18 = f11(...ns, true); // (string | number | true)[] + + function g11(u: U, v: V) { + let x1 = f11(...u); // U + let x2 = f11(...v); // V + let x3 = f11(1, ...u); // [1, ...string[]] + let x4 = f11(...u, ...v); // (string | number)[] + } + + function call(f: (...args: T) => U, ...args: T) { + return f(...args); + } + + function callr(args: T, f: (...args: T) => U) { + return f(...args); + } + + declare function f15(a: string, b: number): string | number; + declare function f16(a: A, b: B): A | B; + + let x20 = call((x, y) => x + y, 10, 20); // number + let x21 = call((x, y) => x + y, 10, "hello"); // string + let x22 = call(f15, "hello", 42); // string | number + let x23 = call(f16, "hello", 42); // unknown + let x24 = call<[string, number], string | number>(f16, "hello", 42); // string | number + + let x30 = callr(sn, (x, y) => x + y); // string + let x31 = callr(sn, f15); // string | number + let x32 = callr(sn, f16); // string | number + + function bind(f: (x: T, ...rest: U) => V, x: T) { + return (...rest: U) => f(x, ...rest); + } + + declare const f20: (x: number, y: string, z: boolean) => string[]; + + const f21 = bind(f20, 42); // (y: string, z: boolean) => string[] + const f22 = bind(f21, "hello"); // (z: boolean) => string[] + const f23 = bind(f22, true); // () => string[] + + f20(42, "hello", true); + f21("hello", true); + f22(true); + f23(); + + declare const g20: (x: number, y?: string, z?: boolean) => string[]; + + const g21 = bind(g20, 42); // (y: string, z: boolean) => string[] + const g22 = bind(g21, "hello"); // (z: boolean) => string[] + const g23 = bind(g22, true); // () => string[] + + g20(42, "hello", true); + g20(42, "hello"); + g20(42); + g21("hello", true); + g21("hello"); + g21(); + g22(true); + g22(); + g23(); + + declare function f30 any)[]>(x: T, ...args: U): U; + + const c30 = f30(42, x => "" + x, x => x + 1); // [(x: number) => string, (x: number) => number] + + type T01 = Parameters<(x: number, y: string, z: boolean) => void>; + type T02 = Parameters<(...args: [number, string, boolean]) => void>; + type T03 = ConstructorParameters void>; + type T04 = ConstructorParameters void>; + type T05 = Parameters<(...args: T[]) => void>; + type T06 = ConstructorParameters void>; + type T07 = Parameters<(...args: T) => void>; + type T08 = ConstructorParameters void>; + type T09 = Parameters; + ~~~~~~~~ +!!! error TS2344: Type 'Function' does not satisfy the constraint '(...args: any) => any'. +!!! error TS2344: Type 'Function' provides no match for the signature '(...args: any): any'. + + type Record1 = { + move: [number, 'left' | 'right']; + jump: [number, 'up' | 'down']; + stop: string; + done: []; + } + + type EventType = { + emit(e: K, ...payload: T[K] extends any[] ? T[K] : [T[K]]): void; + } + + declare var events: EventType; + events.emit('move', 10, 'left'); + events.emit('jump', 20, 'up'); + events.emit('stop', 'Bye!'); + events.emit('done'); + + // Repro from #25871 + + declare var ff1: (... args: any[]) => void; + + declare var ff2: () => void; + declare var ff3: (...args: []) => void; + declare var ff4: (a: never) => void; + + ff1 = ff2; + ff1 = ff3; + ff1 = ff4; // Error + ~~~ +!!! error TS2322: Type '(a: never) => void' is not assignable to type '(...args: any[]) => void'. +!!! error TS2322: Types of parameters 'a' and 'args' are incompatible. +!!! error TS2322: Type 'any' is not assignable to type 'never'. + \ No newline at end of file diff --git a/tests/baselines/reference/genericRestParameters1.js b/tests/baselines/reference/genericRestParameters1.js index 009dca8d67690..0e094d0f288fd 100644 --- a/tests/baselines/reference/genericRestParameters1.js +++ b/tests/baselines/reference/genericRestParameters1.js @@ -1,7 +1,169 @@ //// [genericRestParameters1.ts] +declare let f1: (...x: [number, string, boolean]) => void; +declare let f2: (x0: number, x1: string, x2: boolean) => void; + +f1 = f2; +f2 = f1; + +declare const t3: [number, string, boolean]; +declare const t2: [string, boolean]; +declare const t1: [boolean]; +declare const t0: []; + +declare const ns: [number, string]; +declare const sn: [string, number]; + +f1(42, "hello", true); +f1(t3[0], t3[1], t3[2]); +f1(...t3); +f1(42, ...t2); +f1(42, "hello", ...t1); +f1(42, "hello", true, ...t0); +f1(ns[0], ns[1], true); +f1(...ns, true); // FIXME: Error, since ...ns is considered as string|number here + +f2(42, "hello", true); +f2(t3[0], t3[1], t3[2]); +f2(...t3); +f2(42, ...t2); +f2(42, "hello", ...t1); +f2(42, "hello", true, ...t0); +f2(ns[0], ns[1], true); +f2(...ns, true); // FIXME: Error, since ...ns is considered as string|number here + +declare function f10(...args: T): T; + +const x10 = f10(42, "hello", true); // [number, string, boolean] +const x11 = f10(42, "hello"); // [number, string] +const x12 = f10(42); // [number] +const x13 = f10(); // [] +const x14 = f10(...t3); // [number, string, boolean] +const x15 = f10(42, ...t2); // [number, string, boolean] +const x16 = f10(42, "hello", ...t1); // [number, string, boolean] +const x17 = f10(42, "hello", true, ...t0); // [number, string, boolean] +const x18 = f10(...ns, true); // (string | number | boolean)[] + +function g10(u: U, v: V) { + let x1 = f10(...u); // U + let x2 = f10(...v); // V + let x3 = f10(1, ...u); // [number, ...string[]] + let x4 = f10(...u, ...v); // (string | number)[] +} + +declare function f11(...args: T): T; + +const z10 = f11(42, "hello", true); // [42, "hello", true] +const z11 = f11(42, "hello"); // [42, "hello"] +const z12 = f11(42); // [42] +const z13 = f11(); // [] +const z14 = f11(...t3); // [number, string, boolean] +const z15 = f11(42, ...t2); // [42, string, boolean] +const z16 = f11(42, "hello", ...t1); // [42, "hello", boolean] +const z17 = f11(42, "hello", true, ...t0); // [42, "hello", true] +const z18 = f11(...ns, true); // (string | number | true)[] + +function g11(u: U, v: V) { + let x1 = f11(...u); // U + let x2 = f11(...v); // V + let x3 = f11(1, ...u); // [1, ...string[]] + let x4 = f11(...u, ...v); // (string | number)[] +} + +function call(f: (...args: T) => U, ...args: T) { + return f(...args); +} + +function callr(args: T, f: (...args: T) => U) { + return f(...args); +} + +declare function f15(a: string, b: number): string | number; +declare function f16(a: A, b: B): A | B; + +let x20 = call((x, y) => x + y, 10, 20); // number +let x21 = call((x, y) => x + y, 10, "hello"); // string +let x22 = call(f15, "hello", 42); // string | number +let x23 = call(f16, "hello", 42); // unknown +let x24 = call<[string, number], string | number>(f16, "hello", 42); // string | number + +let x30 = callr(sn, (x, y) => x + y); // string +let x31 = callr(sn, f15); // string | number +let x32 = callr(sn, f16); // string | number + function bind(f: (x: T, ...rest: U) => V, x: T) { return (...rest: U) => f(x, ...rest); -} +} + +declare const f20: (x: number, y: string, z: boolean) => string[]; + +const f21 = bind(f20, 42); // (y: string, z: boolean) => string[] +const f22 = bind(f21, "hello"); // (z: boolean) => string[] +const f23 = bind(f22, true); // () => string[] + +f20(42, "hello", true); +f21("hello", true); +f22(true); +f23(); + +declare const g20: (x: number, y?: string, z?: boolean) => string[]; + +const g21 = bind(g20, 42); // (y: string, z: boolean) => string[] +const g22 = bind(g21, "hello"); // (z: boolean) => string[] +const g23 = bind(g22, true); // () => string[] + +g20(42, "hello", true); +g20(42, "hello"); +g20(42); +g21("hello", true); +g21("hello"); +g21(); +g22(true); +g22(); +g23(); + +declare function f30 any)[]>(x: T, ...args: U): U; + +const c30 = f30(42, x => "" + x, x => x + 1); // [(x: number) => string, (x: number) => number] + +type T01 = Parameters<(x: number, y: string, z: boolean) => void>; +type T02 = Parameters<(...args: [number, string, boolean]) => void>; +type T03 = ConstructorParameters void>; +type T04 = ConstructorParameters void>; +type T05 = Parameters<(...args: T[]) => void>; +type T06 = ConstructorParameters void>; +type T07 = Parameters<(...args: T) => void>; +type T08 = ConstructorParameters void>; +type T09 = Parameters; + +type Record1 = { + move: [number, 'left' | 'right']; + jump: [number, 'up' | 'down']; + stop: string; + done: []; +} + +type EventType = { + emit(e: K, ...payload: T[K] extends any[] ? T[K] : [T[K]]): void; +} + +declare var events: EventType; +events.emit('move', 10, 'left'); +events.emit('jump', 20, 'up'); +events.emit('stop', 'Bye!'); +events.emit('done'); + +// Repro from #25871 + +declare var ff1: (... args: any[]) => void; + +declare var ff2: () => void; +declare var ff3: (...args: []) => void; +declare var ff4: (a: never) => void; + +ff1 = ff2; +ff1 = ff3; +ff1 = ff4; // Error + //// [genericRestParameters1.js] "use strict"; @@ -12,6 +174,72 @@ var __spreadArrays = (this && this.__spreadArrays) || function () { r[k] = a[j]; return r; }; +f1 = f2; +f2 = f1; +f1(42, "hello", true); +f1(t3[0], t3[1], t3[2]); +f1.apply(void 0, t3); +f1.apply(void 0, __spreadArrays([42], t2)); +f1.apply(void 0, __spreadArrays([42, "hello"], t1)); +f1.apply(void 0, __spreadArrays([42, "hello", true], t0)); +f1(ns[0], ns[1], true); +f1.apply(void 0, __spreadArrays(ns, [true])); // FIXME: Error, since ...ns is considered as string|number here +f2(42, "hello", true); +f2(t3[0], t3[1], t3[2]); +f2.apply(void 0, t3); +f2.apply(void 0, __spreadArrays([42], t2)); +f2.apply(void 0, __spreadArrays([42, "hello"], t1)); +f2.apply(void 0, __spreadArrays([42, "hello", true], t0)); +f2(ns[0], ns[1], true); +f2.apply(void 0, __spreadArrays(ns, [true])); // FIXME: Error, since ...ns is considered as string|number here +var x10 = f10(42, "hello", true); // [number, string, boolean] +var x11 = f10(42, "hello"); // [number, string] +var x12 = f10(42); // [number] +var x13 = f10(); // [] +var x14 = f10.apply(void 0, t3); // [number, string, boolean] +var x15 = f10.apply(void 0, __spreadArrays([42], t2)); // [number, string, boolean] +var x16 = f10.apply(void 0, __spreadArrays([42, "hello"], t1)); // [number, string, boolean] +var x17 = f10.apply(void 0, __spreadArrays([42, "hello", true], t0)); // [number, string, boolean] +var x18 = f10.apply(void 0, __spreadArrays(ns, [true])); // (string | number | boolean)[] +function g10(u, v) { + var x1 = f10.apply(void 0, u); // U + var x2 = f10.apply(void 0, v); // V + var x3 = f10.apply(void 0, __spreadArrays([1], u)); // [number, ...string[]] + var x4 = f10.apply(void 0, __spreadArrays(u, v)); // (string | number)[] +} +var z10 = f11(42, "hello", true); // [42, "hello", true] +var z11 = f11(42, "hello"); // [42, "hello"] +var z12 = f11(42); // [42] +var z13 = f11(); // [] +var z14 = f11.apply(void 0, t3); // [number, string, boolean] +var z15 = f11.apply(void 0, __spreadArrays([42], t2)); // [42, string, boolean] +var z16 = f11.apply(void 0, __spreadArrays([42, "hello"], t1)); // [42, "hello", boolean] +var z17 = f11.apply(void 0, __spreadArrays([42, "hello", true], t0)); // [42, "hello", true] +var z18 = f11.apply(void 0, __spreadArrays(ns, [true])); // (string | number | true)[] +function g11(u, v) { + var x1 = f11.apply(void 0, u); // U + var x2 = f11.apply(void 0, v); // V + var x3 = f11.apply(void 0, __spreadArrays([1], u)); // [1, ...string[]] + var x4 = f11.apply(void 0, __spreadArrays(u, v)); // (string | number)[] +} +function call(f) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + return f.apply(void 0, args); +} +function callr(args, f) { + return f.apply(void 0, args); +} +var x20 = call(function (x, y) { return x + y; }, 10, 20); // number +var x21 = call(function (x, y) { return x + y; }, 10, "hello"); // string +var x22 = call(f15, "hello", 42); // string | number +var x23 = call(f16, "hello", 42); // unknown +var x24 = call(f16, "hello", 42); // string | number +var x30 = callr(sn, function (x, y) { return x + y; }); // string +var x31 = callr(sn, f15); // string | number +var x32 = callr(sn, f16); // string | number function bind(f, x) { return function () { var rest = []; @@ -21,7 +249,109 @@ function bind(f, x) { return f.apply(void 0, __spreadArrays([x], rest)); }; } +var f21 = bind(f20, 42); // (y: string, z: boolean) => string[] +var f22 = bind(f21, "hello"); // (z: boolean) => string[] +var f23 = bind(f22, true); // () => string[] +f20(42, "hello", true); +f21("hello", true); +f22(true); +f23(); +var g21 = bind(g20, 42); // (y: string, z: boolean) => string[] +var g22 = bind(g21, "hello"); // (z: boolean) => string[] +var g23 = bind(g22, true); // () => string[] +g20(42, "hello", true); +g20(42, "hello"); +g20(42); +g21("hello", true); +g21("hello"); +g21(); +g22(true); +g22(); +g23(); +var c30 = f30(42, function (x) { return "" + x; }, function (x) { return x + 1; }); // [(x: number) => string, (x: number) => number] +events.emit('move', 10, 'left'); +events.emit('jump', 20, 'up'); +events.emit('stop', 'Bye!'); +events.emit('done'); +ff1 = ff2; +ff1 = ff3; +ff1 = ff4; // Error //// [genericRestParameters1.d.ts] +declare let f1: (...x: [number, string, boolean]) => void; +declare let f2: (x0: number, x1: string, x2: boolean) => void; +declare const t3: [number, string, boolean]; +declare const t2: [string, boolean]; +declare const t1: [boolean]; +declare const t0: []; +declare const ns: [number, string]; +declare const sn: [string, number]; +declare function f10(...args: T): T; +declare const x10: [number, string, boolean]; +declare const x11: [number, string]; +declare const x12: [number]; +declare const x13: []; +declare const x14: [number, string, boolean]; +declare const x15: [number, string, boolean]; +declare const x16: [number, string, boolean]; +declare const x17: [number, string, boolean]; +declare const x18: (string | number | boolean)[]; +declare function g10(u: U, v: V): void; +declare function f11(...args: T): T; +declare const z10: [42, "hello", true]; +declare const z11: [42, "hello"]; +declare const z12: [42]; +declare const z13: []; +declare const z14: [number, string, boolean]; +declare const z15: [42, string, boolean]; +declare const z16: [42, "hello", boolean]; +declare const z17: [42, "hello", true]; +declare const z18: (string | number | true)[]; +declare function g11(u: U, v: V): void; +declare function call(f: (...args: T) => U, ...args: T): U; +declare function callr(args: T, f: (...args: T) => U): U; +declare function f15(a: string, b: number): string | number; +declare function f16(a: A, b: B): A | B; +declare let x20: number; +declare let x21: string; +declare let x22: string | number; +declare let x23: string | number; +declare let x24: string | number; +declare let x30: string; +declare let x31: string | number; +declare let x32: string | number; declare function bind(f: (x: T, ...rest: U) => V, x: T): (...rest: U) => V; +declare const f20: (x: number, y: string, z: boolean) => string[]; +declare const f21: (y: string, z: boolean) => string[]; +declare const f22: (z: boolean) => string[]; +declare const f23: () => string[]; +declare const g20: (x: number, y?: string, z?: boolean) => string[]; +declare const g21: (y?: string | undefined, z?: boolean | undefined) => string[]; +declare const g22: (z?: boolean | undefined) => string[]; +declare const g23: () => string[]; +declare function f30 any)[]>(x: T, ...args: U): U; +declare const c30: [(x: number) => string, (x: number) => number]; +declare type T01 = Parameters<(x: number, y: string, z: boolean) => void>; +declare type T02 = Parameters<(...args: [number, string, boolean]) => void>; +declare type T03 = ConstructorParameters void>; +declare type T04 = ConstructorParameters void>; +declare type T05 = Parameters<(...args: T[]) => void>; +declare type T06 = ConstructorParameters void>; +declare type T07 = Parameters<(...args: T) => void>; +declare type T08 = ConstructorParameters void>; +declare type T09 = Parameters; +declare type Record1 = { + move: [number, 'left' | 'right']; + jump: [number, 'up' | 'down']; + stop: string; + done: []; +}; +declare type EventType = { + emit(e: K, ...payload: T[K] extends any[] ? T[K] : [T[K]]): void; +}; +declare var events: EventType; +declare var ff1: (...args: any[]) => void; +declare var ff2: () => void; +declare var ff3: (...args: []) => void; +declare var ff4: (a: never) => void; diff --git a/tests/baselines/reference/genericRestParameters1.symbols b/tests/baselines/reference/genericRestParameters1.symbols index 7e4e3f262f1b0..56f1bc6cf5869 100644 --- a/tests/baselines/reference/genericRestParameters1.symbols +++ b/tests/baselines/reference/genericRestParameters1.symbols @@ -1,22 +1,642 @@ === tests/cases/conformance/types/rest/genericRestParameters1.ts === +declare let f1: (...x: [number, string, boolean]) => void; +>f1 : Symbol(f1, Decl(genericRestParameters1.ts, 0, 11)) +>x : Symbol(x, Decl(genericRestParameters1.ts, 0, 17)) + +declare let f2: (x0: number, x1: string, x2: boolean) => void; +>f2 : Symbol(f2, Decl(genericRestParameters1.ts, 1, 11)) +>x0 : Symbol(x0, Decl(genericRestParameters1.ts, 1, 17)) +>x1 : Symbol(x1, Decl(genericRestParameters1.ts, 1, 28)) +>x2 : Symbol(x2, Decl(genericRestParameters1.ts, 1, 40)) + +f1 = f2; +>f1 : Symbol(f1, Decl(genericRestParameters1.ts, 0, 11)) +>f2 : Symbol(f2, Decl(genericRestParameters1.ts, 1, 11)) + +f2 = f1; +>f2 : Symbol(f2, Decl(genericRestParameters1.ts, 1, 11)) +>f1 : Symbol(f1, Decl(genericRestParameters1.ts, 0, 11)) + +declare const t3: [number, string, boolean]; +>t3 : Symbol(t3, Decl(genericRestParameters1.ts, 6, 13)) + +declare const t2: [string, boolean]; +>t2 : Symbol(t2, Decl(genericRestParameters1.ts, 7, 13)) + +declare const t1: [boolean]; +>t1 : Symbol(t1, Decl(genericRestParameters1.ts, 8, 13)) + +declare const t0: []; +>t0 : Symbol(t0, Decl(genericRestParameters1.ts, 9, 13)) + +declare const ns: [number, string]; +>ns : Symbol(ns, Decl(genericRestParameters1.ts, 11, 13)) + +declare const sn: [string, number]; +>sn : Symbol(sn, Decl(genericRestParameters1.ts, 12, 13)) + +f1(42, "hello", true); +>f1 : Symbol(f1, Decl(genericRestParameters1.ts, 0, 11)) + +f1(t3[0], t3[1], t3[2]); +>f1 : Symbol(f1, Decl(genericRestParameters1.ts, 0, 11)) +>t3 : Symbol(t3, Decl(genericRestParameters1.ts, 6, 13)) +>0 : Symbol(0) +>t3 : Symbol(t3, Decl(genericRestParameters1.ts, 6, 13)) +>1 : Symbol(1) +>t3 : Symbol(t3, Decl(genericRestParameters1.ts, 6, 13)) +>2 : Symbol(2) + +f1(...t3); +>f1 : Symbol(f1, Decl(genericRestParameters1.ts, 0, 11)) +>t3 : Symbol(t3, Decl(genericRestParameters1.ts, 6, 13)) + +f1(42, ...t2); +>f1 : Symbol(f1, Decl(genericRestParameters1.ts, 0, 11)) +>t2 : Symbol(t2, Decl(genericRestParameters1.ts, 7, 13)) + +f1(42, "hello", ...t1); +>f1 : Symbol(f1, Decl(genericRestParameters1.ts, 0, 11)) +>t1 : Symbol(t1, Decl(genericRestParameters1.ts, 8, 13)) + +f1(42, "hello", true, ...t0); +>f1 : Symbol(f1, Decl(genericRestParameters1.ts, 0, 11)) +>t0 : Symbol(t0, Decl(genericRestParameters1.ts, 9, 13)) + +f1(ns[0], ns[1], true); +>f1 : Symbol(f1, Decl(genericRestParameters1.ts, 0, 11)) +>ns : Symbol(ns, Decl(genericRestParameters1.ts, 11, 13)) +>0 : Symbol(0) +>ns : Symbol(ns, Decl(genericRestParameters1.ts, 11, 13)) +>1 : Symbol(1) + +f1(...ns, true); // FIXME: Error, since ...ns is considered as string|number here +>f1 : Symbol(f1, Decl(genericRestParameters1.ts, 0, 11)) +>ns : Symbol(ns, Decl(genericRestParameters1.ts, 11, 13)) + +f2(42, "hello", true); +>f2 : Symbol(f2, Decl(genericRestParameters1.ts, 1, 11)) + +f2(t3[0], t3[1], t3[2]); +>f2 : Symbol(f2, Decl(genericRestParameters1.ts, 1, 11)) +>t3 : Symbol(t3, Decl(genericRestParameters1.ts, 6, 13)) +>0 : Symbol(0) +>t3 : Symbol(t3, Decl(genericRestParameters1.ts, 6, 13)) +>1 : Symbol(1) +>t3 : Symbol(t3, Decl(genericRestParameters1.ts, 6, 13)) +>2 : Symbol(2) + +f2(...t3); +>f2 : Symbol(f2, Decl(genericRestParameters1.ts, 1, 11)) +>t3 : Symbol(t3, Decl(genericRestParameters1.ts, 6, 13)) + +f2(42, ...t2); +>f2 : Symbol(f2, Decl(genericRestParameters1.ts, 1, 11)) +>t2 : Symbol(t2, Decl(genericRestParameters1.ts, 7, 13)) + +f2(42, "hello", ...t1); +>f2 : Symbol(f2, Decl(genericRestParameters1.ts, 1, 11)) +>t1 : Symbol(t1, Decl(genericRestParameters1.ts, 8, 13)) + +f2(42, "hello", true, ...t0); +>f2 : Symbol(f2, Decl(genericRestParameters1.ts, 1, 11)) +>t0 : Symbol(t0, Decl(genericRestParameters1.ts, 9, 13)) + +f2(ns[0], ns[1], true); +>f2 : Symbol(f2, Decl(genericRestParameters1.ts, 1, 11)) +>ns : Symbol(ns, Decl(genericRestParameters1.ts, 11, 13)) +>0 : Symbol(0) +>ns : Symbol(ns, Decl(genericRestParameters1.ts, 11, 13)) +>1 : Symbol(1) + +f2(...ns, true); // FIXME: Error, since ...ns is considered as string|number here +>f2 : Symbol(f2, Decl(genericRestParameters1.ts, 1, 11)) +>ns : Symbol(ns, Decl(genericRestParameters1.ts, 11, 13)) + +declare function f10(...args: T): T; +>f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 32, 21)) +>args : Symbol(args, Decl(genericRestParameters1.ts, 32, 42)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 32, 21)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 32, 21)) + +const x10 = f10(42, "hello", true); // [number, string, boolean] +>x10 : Symbol(x10, Decl(genericRestParameters1.ts, 34, 5)) +>f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) + +const x11 = f10(42, "hello"); // [number, string] +>x11 : Symbol(x11, Decl(genericRestParameters1.ts, 35, 5)) +>f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) + +const x12 = f10(42); // [number] +>x12 : Symbol(x12, Decl(genericRestParameters1.ts, 36, 5)) +>f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) + +const x13 = f10(); // [] +>x13 : Symbol(x13, Decl(genericRestParameters1.ts, 37, 5)) +>f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) + +const x14 = f10(...t3); // [number, string, boolean] +>x14 : Symbol(x14, Decl(genericRestParameters1.ts, 38, 5)) +>f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) +>t3 : Symbol(t3, Decl(genericRestParameters1.ts, 6, 13)) + +const x15 = f10(42, ...t2); // [number, string, boolean] +>x15 : Symbol(x15, Decl(genericRestParameters1.ts, 39, 5)) +>f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) +>t2 : Symbol(t2, Decl(genericRestParameters1.ts, 7, 13)) + +const x16 = f10(42, "hello", ...t1); // [number, string, boolean] +>x16 : Symbol(x16, Decl(genericRestParameters1.ts, 40, 5)) +>f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) +>t1 : Symbol(t1, Decl(genericRestParameters1.ts, 8, 13)) + +const x17 = f10(42, "hello", true, ...t0); // [number, string, boolean] +>x17 : Symbol(x17, Decl(genericRestParameters1.ts, 41, 5)) +>f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) +>t0 : Symbol(t0, Decl(genericRestParameters1.ts, 9, 13)) + +const x18 = f10(...ns, true); // (string | number | boolean)[] +>x18 : Symbol(x18, Decl(genericRestParameters1.ts, 42, 5)) +>f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) +>ns : Symbol(ns, Decl(genericRestParameters1.ts, 11, 13)) + +function g10(u: U, v: V) { +>g10 : Symbol(g10, Decl(genericRestParameters1.ts, 42, 29)) +>U : Symbol(U, Decl(genericRestParameters1.ts, 44, 13)) +>V : Symbol(V, Decl(genericRestParameters1.ts, 44, 32)) +>u : Symbol(u, Decl(genericRestParameters1.ts, 44, 61)) +>U : Symbol(U, Decl(genericRestParameters1.ts, 44, 13)) +>v : Symbol(v, Decl(genericRestParameters1.ts, 44, 66)) +>V : Symbol(V, Decl(genericRestParameters1.ts, 44, 32)) + + let x1 = f10(...u); // U +>x1 : Symbol(x1, Decl(genericRestParameters1.ts, 45, 7)) +>f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) +>u : Symbol(u, Decl(genericRestParameters1.ts, 44, 61)) + + let x2 = f10(...v); // V +>x2 : Symbol(x2, Decl(genericRestParameters1.ts, 46, 7)) +>f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) +>v : Symbol(v, Decl(genericRestParameters1.ts, 44, 66)) + + let x3 = f10(1, ...u); // [number, ...string[]] +>x3 : Symbol(x3, Decl(genericRestParameters1.ts, 47, 7)) +>f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) +>u : Symbol(u, Decl(genericRestParameters1.ts, 44, 61)) + + let x4 = f10(...u, ...v); // (string | number)[] +>x4 : Symbol(x4, Decl(genericRestParameters1.ts, 48, 7)) +>f10 : Symbol(f10, Decl(genericRestParameters1.ts, 30, 16)) +>u : Symbol(u, Decl(genericRestParameters1.ts, 44, 61)) +>v : Symbol(v, Decl(genericRestParameters1.ts, 44, 66)) +} + +declare function f11(...args: T): T; +>f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 51, 21)) +>args : Symbol(args, Decl(genericRestParameters1.ts, 51, 62)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 51, 21)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 51, 21)) + +const z10 = f11(42, "hello", true); // [42, "hello", true] +>z10 : Symbol(z10, Decl(genericRestParameters1.ts, 53, 5)) +>f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) + +const z11 = f11(42, "hello"); // [42, "hello"] +>z11 : Symbol(z11, Decl(genericRestParameters1.ts, 54, 5)) +>f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) + +const z12 = f11(42); // [42] +>z12 : Symbol(z12, Decl(genericRestParameters1.ts, 55, 5)) +>f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) + +const z13 = f11(); // [] +>z13 : Symbol(z13, Decl(genericRestParameters1.ts, 56, 5)) +>f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) + +const z14 = f11(...t3); // [number, string, boolean] +>z14 : Symbol(z14, Decl(genericRestParameters1.ts, 57, 5)) +>f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) +>t3 : Symbol(t3, Decl(genericRestParameters1.ts, 6, 13)) + +const z15 = f11(42, ...t2); // [42, string, boolean] +>z15 : Symbol(z15, Decl(genericRestParameters1.ts, 58, 5)) +>f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) +>t2 : Symbol(t2, Decl(genericRestParameters1.ts, 7, 13)) + +const z16 = f11(42, "hello", ...t1); // [42, "hello", boolean] +>z16 : Symbol(z16, Decl(genericRestParameters1.ts, 59, 5)) +>f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) +>t1 : Symbol(t1, Decl(genericRestParameters1.ts, 8, 13)) + +const z17 = f11(42, "hello", true, ...t0); // [42, "hello", true] +>z17 : Symbol(z17, Decl(genericRestParameters1.ts, 60, 5)) +>f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) +>t0 : Symbol(t0, Decl(genericRestParameters1.ts, 9, 13)) + +const z18 = f11(...ns, true); // (string | number | true)[] +>z18 : Symbol(z18, Decl(genericRestParameters1.ts, 61, 5)) +>f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) +>ns : Symbol(ns, Decl(genericRestParameters1.ts, 11, 13)) + +function g11(u: U, v: V) { +>g11 : Symbol(g11, Decl(genericRestParameters1.ts, 61, 29)) +>U : Symbol(U, Decl(genericRestParameters1.ts, 63, 13)) +>V : Symbol(V, Decl(genericRestParameters1.ts, 63, 32)) +>u : Symbol(u, Decl(genericRestParameters1.ts, 63, 61)) +>U : Symbol(U, Decl(genericRestParameters1.ts, 63, 13)) +>v : Symbol(v, Decl(genericRestParameters1.ts, 63, 66)) +>V : Symbol(V, Decl(genericRestParameters1.ts, 63, 32)) + + let x1 = f11(...u); // U +>x1 : Symbol(x1, Decl(genericRestParameters1.ts, 64, 7)) +>f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) +>u : Symbol(u, Decl(genericRestParameters1.ts, 63, 61)) + + let x2 = f11(...v); // V +>x2 : Symbol(x2, Decl(genericRestParameters1.ts, 65, 7)) +>f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) +>v : Symbol(v, Decl(genericRestParameters1.ts, 63, 66)) + + let x3 = f11(1, ...u); // [1, ...string[]] +>x3 : Symbol(x3, Decl(genericRestParameters1.ts, 66, 7)) +>f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) +>u : Symbol(u, Decl(genericRestParameters1.ts, 63, 61)) + + let x4 = f11(...u, ...v); // (string | number)[] +>x4 : Symbol(x4, Decl(genericRestParameters1.ts, 67, 7)) +>f11 : Symbol(f11, Decl(genericRestParameters1.ts, 49, 1)) +>u : Symbol(u, Decl(genericRestParameters1.ts, 63, 61)) +>v : Symbol(v, Decl(genericRestParameters1.ts, 63, 66)) +} + +function call(f: (...args: T) => U, ...args: T) { +>call : Symbol(call, Decl(genericRestParameters1.ts, 68, 1)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 70, 14)) +>U : Symbol(U, Decl(genericRestParameters1.ts, 70, 34)) +>f : Symbol(f, Decl(genericRestParameters1.ts, 70, 38)) +>args : Symbol(args, Decl(genericRestParameters1.ts, 70, 42)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 70, 14)) +>U : Symbol(U, Decl(genericRestParameters1.ts, 70, 34)) +>args : Symbol(args, Decl(genericRestParameters1.ts, 70, 59)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 70, 14)) + + return f(...args); +>f : Symbol(f, Decl(genericRestParameters1.ts, 70, 38)) +>args : Symbol(args, Decl(genericRestParameters1.ts, 70, 59)) +} + +function callr(args: T, f: (...args: T) => U) { +>callr : Symbol(callr, Decl(genericRestParameters1.ts, 72, 1)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 74, 15)) +>U : Symbol(U, Decl(genericRestParameters1.ts, 74, 35)) +>args : Symbol(args, Decl(genericRestParameters1.ts, 74, 39)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 74, 15)) +>f : Symbol(f, Decl(genericRestParameters1.ts, 74, 47)) +>args : Symbol(args, Decl(genericRestParameters1.ts, 74, 52)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 74, 15)) +>U : Symbol(U, Decl(genericRestParameters1.ts, 74, 35)) + + return f(...args); +>f : Symbol(f, Decl(genericRestParameters1.ts, 74, 47)) +>args : Symbol(args, Decl(genericRestParameters1.ts, 74, 39)) +} + +declare function f15(a: string, b: number): string | number; +>f15 : Symbol(f15, Decl(genericRestParameters1.ts, 76, 1)) +>a : Symbol(a, Decl(genericRestParameters1.ts, 78, 21)) +>b : Symbol(b, Decl(genericRestParameters1.ts, 78, 31)) + +declare function f16(a: A, b: B): A | B; +>f16 : Symbol(f16, Decl(genericRestParameters1.ts, 78, 60)) +>A : Symbol(A, Decl(genericRestParameters1.ts, 79, 21)) +>B : Symbol(B, Decl(genericRestParameters1.ts, 79, 23)) +>a : Symbol(a, Decl(genericRestParameters1.ts, 79, 27)) +>A : Symbol(A, Decl(genericRestParameters1.ts, 79, 21)) +>b : Symbol(b, Decl(genericRestParameters1.ts, 79, 32)) +>B : Symbol(B, Decl(genericRestParameters1.ts, 79, 23)) +>A : Symbol(A, Decl(genericRestParameters1.ts, 79, 21)) +>B : Symbol(B, Decl(genericRestParameters1.ts, 79, 23)) + +let x20 = call((x, y) => x + y, 10, 20); // number +>x20 : Symbol(x20, Decl(genericRestParameters1.ts, 81, 3)) +>call : Symbol(call, Decl(genericRestParameters1.ts, 68, 1)) +>x : Symbol(x, Decl(genericRestParameters1.ts, 81, 16)) +>y : Symbol(y, Decl(genericRestParameters1.ts, 81, 18)) +>x : Symbol(x, Decl(genericRestParameters1.ts, 81, 16)) +>y : Symbol(y, Decl(genericRestParameters1.ts, 81, 18)) + +let x21 = call((x, y) => x + y, 10, "hello"); // string +>x21 : Symbol(x21, Decl(genericRestParameters1.ts, 82, 3)) +>call : Symbol(call, Decl(genericRestParameters1.ts, 68, 1)) +>x : Symbol(x, Decl(genericRestParameters1.ts, 82, 16)) +>y : Symbol(y, Decl(genericRestParameters1.ts, 82, 18)) +>x : Symbol(x, Decl(genericRestParameters1.ts, 82, 16)) +>y : Symbol(y, Decl(genericRestParameters1.ts, 82, 18)) + +let x22 = call(f15, "hello", 42); // string | number +>x22 : Symbol(x22, Decl(genericRestParameters1.ts, 83, 3)) +>call : Symbol(call, Decl(genericRestParameters1.ts, 68, 1)) +>f15 : Symbol(f15, Decl(genericRestParameters1.ts, 76, 1)) + +let x23 = call(f16, "hello", 42); // unknown +>x23 : Symbol(x23, Decl(genericRestParameters1.ts, 84, 3)) +>call : Symbol(call, Decl(genericRestParameters1.ts, 68, 1)) +>f16 : Symbol(f16, Decl(genericRestParameters1.ts, 78, 60)) + +let x24 = call<[string, number], string | number>(f16, "hello", 42); // string | number +>x24 : Symbol(x24, Decl(genericRestParameters1.ts, 85, 3)) +>call : Symbol(call, Decl(genericRestParameters1.ts, 68, 1)) +>f16 : Symbol(f16, Decl(genericRestParameters1.ts, 78, 60)) + +let x30 = callr(sn, (x, y) => x + y); // string +>x30 : Symbol(x30, Decl(genericRestParameters1.ts, 87, 3)) +>callr : Symbol(callr, Decl(genericRestParameters1.ts, 72, 1)) +>sn : Symbol(sn, Decl(genericRestParameters1.ts, 12, 13)) +>x : Symbol(x, Decl(genericRestParameters1.ts, 87, 21)) +>y : Symbol(y, Decl(genericRestParameters1.ts, 87, 23)) +>x : Symbol(x, Decl(genericRestParameters1.ts, 87, 21)) +>y : Symbol(y, Decl(genericRestParameters1.ts, 87, 23)) + +let x31 = callr(sn, f15); // string | number +>x31 : Symbol(x31, Decl(genericRestParameters1.ts, 88, 3)) +>callr : Symbol(callr, Decl(genericRestParameters1.ts, 72, 1)) +>sn : Symbol(sn, Decl(genericRestParameters1.ts, 12, 13)) +>f15 : Symbol(f15, Decl(genericRestParameters1.ts, 76, 1)) + +let x32 = callr(sn, f16); // string | number +>x32 : Symbol(x32, Decl(genericRestParameters1.ts, 89, 3)) +>callr : Symbol(callr, Decl(genericRestParameters1.ts, 72, 1)) +>sn : Symbol(sn, Decl(genericRestParameters1.ts, 12, 13)) +>f16 : Symbol(f16, Decl(genericRestParameters1.ts, 78, 60)) + function bind(f: (x: T, ...rest: U) => V, x: T) { ->bind : Symbol(bind, Decl(genericRestParameters1.ts, 0, 0)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 0, 14)) ->U : Symbol(U, Decl(genericRestParameters1.ts, 0, 16)) ->V : Symbol(V, Decl(genericRestParameters1.ts, 0, 37)) ->f : Symbol(f, Decl(genericRestParameters1.ts, 0, 41)) ->x : Symbol(x, Decl(genericRestParameters1.ts, 0, 45)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 0, 14)) ->rest : Symbol(rest, Decl(genericRestParameters1.ts, 0, 50)) ->U : Symbol(U, Decl(genericRestParameters1.ts, 0, 16)) ->V : Symbol(V, Decl(genericRestParameters1.ts, 0, 37)) ->x : Symbol(x, Decl(genericRestParameters1.ts, 0, 68)) ->T : Symbol(T, Decl(genericRestParameters1.ts, 0, 14)) +>bind : Symbol(bind, Decl(genericRestParameters1.ts, 89, 25)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 91, 14)) +>U : Symbol(U, Decl(genericRestParameters1.ts, 91, 16)) +>V : Symbol(V, Decl(genericRestParameters1.ts, 91, 37)) +>f : Symbol(f, Decl(genericRestParameters1.ts, 91, 41)) +>x : Symbol(x, Decl(genericRestParameters1.ts, 91, 45)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 91, 14)) +>rest : Symbol(rest, Decl(genericRestParameters1.ts, 91, 50)) +>U : Symbol(U, Decl(genericRestParameters1.ts, 91, 16)) +>V : Symbol(V, Decl(genericRestParameters1.ts, 91, 37)) +>x : Symbol(x, Decl(genericRestParameters1.ts, 91, 68)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 91, 14)) return (...rest: U) => f(x, ...rest); ->rest : Symbol(rest, Decl(genericRestParameters1.ts, 1, 12)) ->U : Symbol(U, Decl(genericRestParameters1.ts, 0, 16)) ->f : Symbol(f, Decl(genericRestParameters1.ts, 0, 41)) ->x : Symbol(x, Decl(genericRestParameters1.ts, 0, 68)) ->rest : Symbol(rest, Decl(genericRestParameters1.ts, 1, 12)) +>rest : Symbol(rest, Decl(genericRestParameters1.ts, 92, 12)) +>U : Symbol(U, Decl(genericRestParameters1.ts, 91, 16)) +>f : Symbol(f, Decl(genericRestParameters1.ts, 91, 41)) +>x : Symbol(x, Decl(genericRestParameters1.ts, 91, 68)) +>rest : Symbol(rest, Decl(genericRestParameters1.ts, 92, 12)) +} + +declare const f20: (x: number, y: string, z: boolean) => string[]; +>f20 : Symbol(f20, Decl(genericRestParameters1.ts, 95, 13)) +>x : Symbol(x, Decl(genericRestParameters1.ts, 95, 20)) +>y : Symbol(y, Decl(genericRestParameters1.ts, 95, 30)) +>z : Symbol(z, Decl(genericRestParameters1.ts, 95, 41)) + +const f21 = bind(f20, 42); // (y: string, z: boolean) => string[] +>f21 : Symbol(f21, Decl(genericRestParameters1.ts, 97, 5)) +>bind : Symbol(bind, Decl(genericRestParameters1.ts, 89, 25)) +>f20 : Symbol(f20, Decl(genericRestParameters1.ts, 95, 13)) + +const f22 = bind(f21, "hello"); // (z: boolean) => string[] +>f22 : Symbol(f22, Decl(genericRestParameters1.ts, 98, 5)) +>bind : Symbol(bind, Decl(genericRestParameters1.ts, 89, 25)) +>f21 : Symbol(f21, Decl(genericRestParameters1.ts, 97, 5)) + +const f23 = bind(f22, true); // () => string[] +>f23 : Symbol(f23, Decl(genericRestParameters1.ts, 99, 5)) +>bind : Symbol(bind, Decl(genericRestParameters1.ts, 89, 25)) +>f22 : Symbol(f22, Decl(genericRestParameters1.ts, 98, 5)) + +f20(42, "hello", true); +>f20 : Symbol(f20, Decl(genericRestParameters1.ts, 95, 13)) + +f21("hello", true); +>f21 : Symbol(f21, Decl(genericRestParameters1.ts, 97, 5)) + +f22(true); +>f22 : Symbol(f22, Decl(genericRestParameters1.ts, 98, 5)) + +f23(); +>f23 : Symbol(f23, Decl(genericRestParameters1.ts, 99, 5)) + +declare const g20: (x: number, y?: string, z?: boolean) => string[]; +>g20 : Symbol(g20, Decl(genericRestParameters1.ts, 106, 13)) +>x : Symbol(x, Decl(genericRestParameters1.ts, 106, 20)) +>y : Symbol(y, Decl(genericRestParameters1.ts, 106, 30)) +>z : Symbol(z, Decl(genericRestParameters1.ts, 106, 42)) + +const g21 = bind(g20, 42); // (y: string, z: boolean) => string[] +>g21 : Symbol(g21, Decl(genericRestParameters1.ts, 108, 5)) +>bind : Symbol(bind, Decl(genericRestParameters1.ts, 89, 25)) +>g20 : Symbol(g20, Decl(genericRestParameters1.ts, 106, 13)) + +const g22 = bind(g21, "hello"); // (z: boolean) => string[] +>g22 : Symbol(g22, Decl(genericRestParameters1.ts, 109, 5)) +>bind : Symbol(bind, Decl(genericRestParameters1.ts, 89, 25)) +>g21 : Symbol(g21, Decl(genericRestParameters1.ts, 108, 5)) + +const g23 = bind(g22, true); // () => string[] +>g23 : Symbol(g23, Decl(genericRestParameters1.ts, 110, 5)) +>bind : Symbol(bind, Decl(genericRestParameters1.ts, 89, 25)) +>g22 : Symbol(g22, Decl(genericRestParameters1.ts, 109, 5)) + +g20(42, "hello", true); +>g20 : Symbol(g20, Decl(genericRestParameters1.ts, 106, 13)) + +g20(42, "hello"); +>g20 : Symbol(g20, Decl(genericRestParameters1.ts, 106, 13)) + +g20(42); +>g20 : Symbol(g20, Decl(genericRestParameters1.ts, 106, 13)) + +g21("hello", true); +>g21 : Symbol(g21, Decl(genericRestParameters1.ts, 108, 5)) + +g21("hello"); +>g21 : Symbol(g21, Decl(genericRestParameters1.ts, 108, 5)) + +g21(); +>g21 : Symbol(g21, Decl(genericRestParameters1.ts, 108, 5)) + +g22(true); +>g22 : Symbol(g22, Decl(genericRestParameters1.ts, 109, 5)) + +g22(); +>g22 : Symbol(g22, Decl(genericRestParameters1.ts, 109, 5)) + +g23(); +>g23 : Symbol(g23, Decl(genericRestParameters1.ts, 110, 5)) + +declare function f30 any)[]>(x: T, ...args: U): U; +>f30 : Symbol(f30, Decl(genericRestParameters1.ts, 120, 6)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 122, 21)) +>U : Symbol(U, Decl(genericRestParameters1.ts, 122, 23)) +>x : Symbol(x, Decl(genericRestParameters1.ts, 122, 36)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 122, 21)) +>x : Symbol(x, Decl(genericRestParameters1.ts, 122, 53)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 122, 21)) +>args : Symbol(args, Decl(genericRestParameters1.ts, 122, 58)) +>U : Symbol(U, Decl(genericRestParameters1.ts, 122, 23)) +>U : Symbol(U, Decl(genericRestParameters1.ts, 122, 23)) + +const c30 = f30(42, x => "" + x, x => x + 1); // [(x: number) => string, (x: number) => number] +>c30 : Symbol(c30, Decl(genericRestParameters1.ts, 124, 5)) +>f30 : Symbol(f30, Decl(genericRestParameters1.ts, 120, 6)) +>x : Symbol(x, Decl(genericRestParameters1.ts, 124, 19)) +>x : Symbol(x, Decl(genericRestParameters1.ts, 124, 19)) +>x : Symbol(x, Decl(genericRestParameters1.ts, 124, 32)) +>x : Symbol(x, Decl(genericRestParameters1.ts, 124, 32)) + +type T01 = Parameters<(x: number, y: string, z: boolean) => void>; +>T01 : Symbol(T01, Decl(genericRestParameters1.ts, 124, 45)) +>Parameters : Symbol(Parameters, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(genericRestParameters1.ts, 126, 23)) +>y : Symbol(y, Decl(genericRestParameters1.ts, 126, 33)) +>z : Symbol(z, Decl(genericRestParameters1.ts, 126, 44)) + +type T02 = Parameters<(...args: [number, string, boolean]) => void>; +>T02 : Symbol(T02, Decl(genericRestParameters1.ts, 126, 66)) +>Parameters : Symbol(Parameters, Decl(lib.es5.d.ts, --, --)) +>args : Symbol(args, Decl(genericRestParameters1.ts, 127, 23)) + +type T03 = ConstructorParameters void>; +>T03 : Symbol(T03, Decl(genericRestParameters1.ts, 127, 68)) +>ConstructorParameters : Symbol(ConstructorParameters, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(genericRestParameters1.ts, 128, 38)) +>y : Symbol(y, Decl(genericRestParameters1.ts, 128, 48)) +>z : Symbol(z, Decl(genericRestParameters1.ts, 128, 59)) + +type T04 = ConstructorParameters void>; +>T04 : Symbol(T04, Decl(genericRestParameters1.ts, 128, 81)) +>ConstructorParameters : Symbol(ConstructorParameters, Decl(lib.es5.d.ts, --, --)) +>args : Symbol(args, Decl(genericRestParameters1.ts, 129, 38)) + +type T05 = Parameters<(...args: T[]) => void>; +>T05 : Symbol(T05, Decl(genericRestParameters1.ts, 129, 83)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 130, 9)) +>Parameters : Symbol(Parameters, Decl(lib.es5.d.ts, --, --)) +>args : Symbol(args, Decl(genericRestParameters1.ts, 130, 26)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 130, 9)) + +type T06 = ConstructorParameters void>; +>T06 : Symbol(T06, Decl(genericRestParameters1.ts, 130, 49)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 131, 9)) +>ConstructorParameters : Symbol(ConstructorParameters, Decl(lib.es5.d.ts, --, --)) +>args : Symbol(args, Decl(genericRestParameters1.ts, 131, 41)) + +type T07 = Parameters<(...args: T) => void>; +>T07 : Symbol(T07, Decl(genericRestParameters1.ts, 131, 63)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 132, 9)) +>Parameters : Symbol(Parameters, Decl(lib.es5.d.ts, --, --)) +>args : Symbol(args, Decl(genericRestParameters1.ts, 132, 40)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 132, 9)) + +type T08 = ConstructorParameters void>; +>T08 : Symbol(T08, Decl(genericRestParameters1.ts, 132, 61)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 133, 9)) +>ConstructorParameters : Symbol(ConstructorParameters, Decl(lib.es5.d.ts, --, --)) +>args : Symbol(args, Decl(genericRestParameters1.ts, 133, 55)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 133, 9)) + +type T09 = Parameters; +>T09 : Symbol(T09, Decl(genericRestParameters1.ts, 133, 76)) +>Parameters : Symbol(Parameters, Decl(lib.es5.d.ts, --, --)) +>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + +type Record1 = { +>Record1 : Symbol(Record1, Decl(genericRestParameters1.ts, 134, 32)) + + move: [number, 'left' | 'right']; +>move : Symbol(move, Decl(genericRestParameters1.ts, 136, 16)) + + jump: [number, 'up' | 'down']; +>jump : Symbol(jump, Decl(genericRestParameters1.ts, 137, 35)) + + stop: string; +>stop : Symbol(stop, Decl(genericRestParameters1.ts, 138, 32)) + + done: []; +>done : Symbol(done, Decl(genericRestParameters1.ts, 139, 15)) +} + +type EventType = { +>EventType : Symbol(EventType, Decl(genericRestParameters1.ts, 141, 1)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 143, 15)) + + emit(e: K, ...payload: T[K] extends any[] ? T[K] : [T[K]]): void; +>emit : Symbol(emit, Decl(genericRestParameters1.ts, 143, 21)) +>K : Symbol(K, Decl(genericRestParameters1.ts, 144, 7)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 143, 15)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 143, 15)) +>e : Symbol(e, Decl(genericRestParameters1.ts, 144, 36)) +>K : Symbol(K, Decl(genericRestParameters1.ts, 144, 7)) +>payload : Symbol(payload, Decl(genericRestParameters1.ts, 144, 41)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 143, 15)) +>K : Symbol(K, Decl(genericRestParameters1.ts, 144, 7)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 143, 15)) +>K : Symbol(K, Decl(genericRestParameters1.ts, 144, 7)) +>T : Symbol(T, Decl(genericRestParameters1.ts, 143, 15)) +>K : Symbol(K, Decl(genericRestParameters1.ts, 144, 7)) } + +declare var events: EventType; +>events : Symbol(events, Decl(genericRestParameters1.ts, 147, 11)) +>EventType : Symbol(EventType, Decl(genericRestParameters1.ts, 141, 1)) +>Record1 : Symbol(Record1, Decl(genericRestParameters1.ts, 134, 32)) + +events.emit('move', 10, 'left'); +>events.emit : Symbol(emit, Decl(genericRestParameters1.ts, 143, 21)) +>events : Symbol(events, Decl(genericRestParameters1.ts, 147, 11)) +>emit : Symbol(emit, Decl(genericRestParameters1.ts, 143, 21)) + +events.emit('jump', 20, 'up'); +>events.emit : Symbol(emit, Decl(genericRestParameters1.ts, 143, 21)) +>events : Symbol(events, Decl(genericRestParameters1.ts, 147, 11)) +>emit : Symbol(emit, Decl(genericRestParameters1.ts, 143, 21)) + +events.emit('stop', 'Bye!'); +>events.emit : Symbol(emit, Decl(genericRestParameters1.ts, 143, 21)) +>events : Symbol(events, Decl(genericRestParameters1.ts, 147, 11)) +>emit : Symbol(emit, Decl(genericRestParameters1.ts, 143, 21)) + +events.emit('done'); +>events.emit : Symbol(emit, Decl(genericRestParameters1.ts, 143, 21)) +>events : Symbol(events, Decl(genericRestParameters1.ts, 147, 11)) +>emit : Symbol(emit, Decl(genericRestParameters1.ts, 143, 21)) + +// Repro from #25871 + +declare var ff1: (... args: any[]) => void; +>ff1 : Symbol(ff1, Decl(genericRestParameters1.ts, 155, 11)) +>args : Symbol(args, Decl(genericRestParameters1.ts, 155, 18)) + +declare var ff2: () => void; +>ff2 : Symbol(ff2, Decl(genericRestParameters1.ts, 157, 11)) + +declare var ff3: (...args: []) => void; +>ff3 : Symbol(ff3, Decl(genericRestParameters1.ts, 158, 11)) +>args : Symbol(args, Decl(genericRestParameters1.ts, 158, 18)) + +declare var ff4: (a: never) => void; +>ff4 : Symbol(ff4, Decl(genericRestParameters1.ts, 159, 11)) +>a : Symbol(a, Decl(genericRestParameters1.ts, 159, 18)) + +ff1 = ff2; +>ff1 : Symbol(ff1, Decl(genericRestParameters1.ts, 155, 11)) +>ff2 : Symbol(ff2, Decl(genericRestParameters1.ts, 157, 11)) + +ff1 = ff3; +>ff1 : Symbol(ff1, Decl(genericRestParameters1.ts, 155, 11)) +>ff3 : Symbol(ff3, Decl(genericRestParameters1.ts, 158, 11)) + +ff1 = ff4; // Error +>ff1 : Symbol(ff1, Decl(genericRestParameters1.ts, 155, 11)) +>ff4 : Symbol(ff4, Decl(genericRestParameters1.ts, 159, 11)) + diff --git a/tests/baselines/reference/genericRestParameters1.types b/tests/baselines/reference/genericRestParameters1.types index 56764f8387686..6dfee15241288 100644 --- a/tests/baselines/reference/genericRestParameters1.types +++ b/tests/baselines/reference/genericRestParameters1.types @@ -1,4 +1,508 @@ === tests/cases/conformance/types/rest/genericRestParameters1.ts === +declare let f1: (...x: [number, string, boolean]) => void; +>f1 : (x_0: number, x_1: string, x_2: boolean) => void +>x : [number, string, boolean] + +declare let f2: (x0: number, x1: string, x2: boolean) => void; +>f2 : (x0: number, x1: string, x2: boolean) => void +>x0 : number +>x1 : string +>x2 : boolean + +f1 = f2; +>f1 = f2 : (x0: number, x1: string, x2: boolean) => void +>f1 : (x_0: number, x_1: string, x_2: boolean) => void +>f2 : (x0: number, x1: string, x2: boolean) => void + +f2 = f1; +>f2 = f1 : (x_0: number, x_1: string, x_2: boolean) => void +>f2 : (x0: number, x1: string, x2: boolean) => void +>f1 : (x_0: number, x_1: string, x_2: boolean) => void + +declare const t3: [number, string, boolean]; +>t3 : [number, string, boolean] + +declare const t2: [string, boolean]; +>t2 : [string, boolean] + +declare const t1: [boolean]; +>t1 : [boolean] + +declare const t0: []; +>t0 : [] + +declare const ns: [number, string]; +>ns : [number, string] + +declare const sn: [string, number]; +>sn : [string, number] + +f1(42, "hello", true); +>f1(42, "hello", true) : void +>f1 : (x_0: number, x_1: string, x_2: boolean) => void +>42 : 42 +>"hello" : "hello" +>true : true + +f1(t3[0], t3[1], t3[2]); +>f1(t3[0], t3[1], t3[2]) : void +>f1 : (x_0: number, x_1: string, x_2: boolean) => void +>t3[0] : number +>t3 : [number, string, boolean] +>0 : 0 +>t3[1] : string +>t3 : [number, string, boolean] +>1 : 1 +>t3[2] : boolean +>t3 : [number, string, boolean] +>2 : 2 + +f1(...t3); +>f1(...t3) : void +>f1 : (x_0: number, x_1: string, x_2: boolean) => void +>...t3 : string | number | boolean +>t3 : [number, string, boolean] + +f1(42, ...t2); +>f1(42, ...t2) : void +>f1 : (x_0: number, x_1: string, x_2: boolean) => void +>42 : 42 +>...t2 : string | boolean +>t2 : [string, boolean] + +f1(42, "hello", ...t1); +>f1(42, "hello", ...t1) : void +>f1 : (x_0: number, x_1: string, x_2: boolean) => void +>42 : 42 +>"hello" : "hello" +>...t1 : boolean +>t1 : [boolean] + +f1(42, "hello", true, ...t0); +>f1(42, "hello", true, ...t0) : void +>f1 : (x_0: number, x_1: string, x_2: boolean) => void +>42 : 42 +>"hello" : "hello" +>true : true +>...t0 : never +>t0 : [] + +f1(ns[0], ns[1], true); +>f1(ns[0], ns[1], true) : void +>f1 : (x_0: number, x_1: string, x_2: boolean) => void +>ns[0] : number +>ns : [number, string] +>0 : 0 +>ns[1] : string +>ns : [number, string] +>1 : 1 +>true : true + +f1(...ns, true); // FIXME: Error, since ...ns is considered as string|number here +>f1(...ns, true) : void +>f1 : (x_0: number, x_1: string, x_2: boolean) => void +>...ns : string | number +>ns : [number, string] +>true : true + +f2(42, "hello", true); +>f2(42, "hello", true) : void +>f2 : (x0: number, x1: string, x2: boolean) => void +>42 : 42 +>"hello" : "hello" +>true : true + +f2(t3[0], t3[1], t3[2]); +>f2(t3[0], t3[1], t3[2]) : void +>f2 : (x0: number, x1: string, x2: boolean) => void +>t3[0] : number +>t3 : [number, string, boolean] +>0 : 0 +>t3[1] : string +>t3 : [number, string, boolean] +>1 : 1 +>t3[2] : boolean +>t3 : [number, string, boolean] +>2 : 2 + +f2(...t3); +>f2(...t3) : void +>f2 : (x0: number, x1: string, x2: boolean) => void +>...t3 : string | number | boolean +>t3 : [number, string, boolean] + +f2(42, ...t2); +>f2(42, ...t2) : void +>f2 : (x0: number, x1: string, x2: boolean) => void +>42 : 42 +>...t2 : string | boolean +>t2 : [string, boolean] + +f2(42, "hello", ...t1); +>f2(42, "hello", ...t1) : void +>f2 : (x0: number, x1: string, x2: boolean) => void +>42 : 42 +>"hello" : "hello" +>...t1 : boolean +>t1 : [boolean] + +f2(42, "hello", true, ...t0); +>f2(42, "hello", true, ...t0) : void +>f2 : (x0: number, x1: string, x2: boolean) => void +>42 : 42 +>"hello" : "hello" +>true : true +>...t0 : never +>t0 : [] + +f2(ns[0], ns[1], true); +>f2(ns[0], ns[1], true) : void +>f2 : (x0: number, x1: string, x2: boolean) => void +>ns[0] : number +>ns : [number, string] +>0 : 0 +>ns[1] : string +>ns : [number, string] +>1 : 1 +>true : true + +f2(...ns, true); // FIXME: Error, since ...ns is considered as string|number here +>f2(...ns, true) : void +>f2 : (x0: number, x1: string, x2: boolean) => void +>...ns : string | number +>ns : [number, string] +>true : true + +declare function f10(...args: T): T; +>f10 : (...args: T) => T +>args : T + +const x10 = f10(42, "hello", true); // [number, string, boolean] +>x10 : [number, string, boolean] +>f10(42, "hello", true) : [number, string, boolean] +>f10 : (...args: T) => T +>42 : 42 +>"hello" : "hello" +>true : true + +const x11 = f10(42, "hello"); // [number, string] +>x11 : [number, string] +>f10(42, "hello") : [number, string] +>f10 : (...args: T) => T +>42 : 42 +>"hello" : "hello" + +const x12 = f10(42); // [number] +>x12 : [number] +>f10(42) : [number] +>f10 : (...args: T) => T +>42 : 42 + +const x13 = f10(); // [] +>x13 : [] +>f10() : [] +>f10 : (...args: T) => T + +const x14 = f10(...t3); // [number, string, boolean] +>x14 : [number, string, boolean] +>f10(...t3) : [number, string, boolean] +>f10 : (...args: T) => T +>...t3 : string | number | boolean +>t3 : [number, string, boolean] + +const x15 = f10(42, ...t2); // [number, string, boolean] +>x15 : [number, string, boolean] +>f10(42, ...t2) : [number, string, boolean] +>f10 : (...args: T) => T +>42 : 42 +>...t2 : string | boolean +>t2 : [string, boolean] + +const x16 = f10(42, "hello", ...t1); // [number, string, boolean] +>x16 : [number, string, boolean] +>f10(42, "hello", ...t1) : [number, string, boolean] +>f10 : (...args: T) => T +>42 : 42 +>"hello" : "hello" +>...t1 : boolean +>t1 : [boolean] + +const x17 = f10(42, "hello", true, ...t0); // [number, string, boolean] +>x17 : [number, string, boolean] +>f10(42, "hello", true, ...t0) : [number, string, boolean] +>f10 : (...args: T) => T +>42 : 42 +>"hello" : "hello" +>true : true +>...t0 : never +>t0 : [] + +const x18 = f10(...ns, true); // (string | number | boolean)[] +>x18 : (string | number | boolean)[] +>f10(...ns, true) : (string | number | boolean)[] +>f10 : (...args: T) => T +>...ns : string | number +>ns : [number, string] +>true : true + +function g10(u: U, v: V) { +>g10 : (u: U, v: V) => void +>u : U +>v : V + + let x1 = f10(...u); // U +>x1 : U +>f10(...u) : U +>f10 : (...args: T) => T +>...u : string +>u : U + + let x2 = f10(...v); // V +>x2 : V +>f10(...v) : V +>f10 : (...args: T) => T +>...v : number +>v : V + + let x3 = f10(1, ...u); // [number, ...string[]] +>x3 : [number, ...string[]] +>f10(1, ...u) : [number, ...string[]] +>f10 : (...args: T) => T +>1 : 1 +>...u : string +>u : U + + let x4 = f10(...u, ...v); // (string | number)[] +>x4 : (string | number)[] +>f10(...u, ...v) : (string | number)[] +>f10 : (...args: T) => T +>...u : string +>u : U +>...v : number +>v : V +} + +declare function f11(...args: T): T; +>f11 : (...args: T) => T +>args : T + +const z10 = f11(42, "hello", true); // [42, "hello", true] +>z10 : [42, "hello", true] +>f11(42, "hello", true) : [42, "hello", true] +>f11 : (...args: T) => T +>42 : 42 +>"hello" : "hello" +>true : true + +const z11 = f11(42, "hello"); // [42, "hello"] +>z11 : [42, "hello"] +>f11(42, "hello") : [42, "hello"] +>f11 : (...args: T) => T +>42 : 42 +>"hello" : "hello" + +const z12 = f11(42); // [42] +>z12 : [42] +>f11(42) : [42] +>f11 : (...args: T) => T +>42 : 42 + +const z13 = f11(); // [] +>z13 : [] +>f11() : [] +>f11 : (...args: T) => T + +const z14 = f11(...t3); // [number, string, boolean] +>z14 : [number, string, boolean] +>f11(...t3) : [number, string, boolean] +>f11 : (...args: T) => T +>...t3 : string | number | boolean +>t3 : [number, string, boolean] + +const z15 = f11(42, ...t2); // [42, string, boolean] +>z15 : [42, string, boolean] +>f11(42, ...t2) : [42, string, boolean] +>f11 : (...args: T) => T +>42 : 42 +>...t2 : string | boolean +>t2 : [string, boolean] + +const z16 = f11(42, "hello", ...t1); // [42, "hello", boolean] +>z16 : [42, "hello", boolean] +>f11(42, "hello", ...t1) : [42, "hello", boolean] +>f11 : (...args: T) => T +>42 : 42 +>"hello" : "hello" +>...t1 : boolean +>t1 : [boolean] + +const z17 = f11(42, "hello", true, ...t0); // [42, "hello", true] +>z17 : [42, "hello", true] +>f11(42, "hello", true, ...t0) : [42, "hello", true] +>f11 : (...args: T) => T +>42 : 42 +>"hello" : "hello" +>true : true +>...t0 : never +>t0 : [] + +const z18 = f11(...ns, true); // (string | number | true)[] +>z18 : (string | number | true)[] +>f11(...ns, true) : (string | number | true)[] +>f11 : (...args: T) => T +>...ns : string | number +>ns : [number, string] +>true : true + +function g11(u: U, v: V) { +>g11 : (u: U, v: V) => void +>u : U +>v : V + + let x1 = f11(...u); // U +>x1 : U +>f11(...u) : U +>f11 : (...args: T) => T +>...u : string +>u : U + + let x2 = f11(...v); // V +>x2 : V +>f11(...v) : V +>f11 : (...args: T) => T +>...v : number +>v : V + + let x3 = f11(1, ...u); // [1, ...string[]] +>x3 : [1, ...string[]] +>f11(1, ...u) : [1, ...string[]] +>f11 : (...args: T) => T +>1 : 1 +>...u : string +>u : U + + let x4 = f11(...u, ...v); // (string | number)[] +>x4 : (string | number)[] +>f11(...u, ...v) : (string | number)[] +>f11 : (...args: T) => T +>...u : string +>u : U +>...v : number +>v : V +} + +function call(f: (...args: T) => U, ...args: T) { +>call : (f: (...args: T) => U, ...args: T) => U +>f : (...args: T) => U +>args : T +>args : T + + return f(...args); +>f(...args) : U +>f : (...args: T) => U +>...args : unknown +>args : T +} + +function callr(args: T, f: (...args: T) => U) { +>callr : (args: T, f: (...args: T) => U) => U +>args : T +>f : (...args: T) => U +>args : T + + return f(...args); +>f(...args) : U +>f : (...args: T) => U +>...args : unknown +>args : T +} + +declare function f15(a: string, b: number): string | number; +>f15 : (a: string, b: number) => string | number +>a : string +>b : number + +declare function f16(a: A, b: B): A | B; +>f16 : (a: A, b: B) => A | B +>a : A +>b : B + +let x20 = call((x, y) => x + y, 10, 20); // number +>x20 : number +>call((x, y) => x + y, 10, 20) : number +>call : (f: (...args: T) => U, ...args: T) => U +>(x, y) => x + y : (x: number, y: number) => number +>x : number +>y : number +>x + y : number +>x : number +>y : number +>10 : 10 +>20 : 20 + +let x21 = call((x, y) => x + y, 10, "hello"); // string +>x21 : string +>call((x, y) => x + y, 10, "hello") : string +>call : (f: (...args: T) => U, ...args: T) => U +>(x, y) => x + y : (x: number, y: string) => string +>x : number +>y : string +>x + y : string +>x : number +>y : string +>10 : 10 +>"hello" : "hello" + +let x22 = call(f15, "hello", 42); // string | number +>x22 : string | number +>call(f15, "hello", 42) : string | number +>call : (f: (...args: T) => U, ...args: T) => U +>f15 : (a: string, b: number) => string | number +>"hello" : "hello" +>42 : 42 + +let x23 = call(f16, "hello", 42); // unknown +>x23 : string | number +>call(f16, "hello", 42) : string | number +>call : (f: (...args: T) => U, ...args: T) => U +>f16 : (a: A, b: B) => A | B +>"hello" : "hello" +>42 : 42 + +let x24 = call<[string, number], string | number>(f16, "hello", 42); // string | number +>x24 : string | number +>call<[string, number], string | number>(f16, "hello", 42) : string | number +>call : (f: (...args: T) => U, ...args: T) => U +>f16 : (a: A, b: B) => A | B +>"hello" : "hello" +>42 : 42 + +let x30 = callr(sn, (x, y) => x + y); // string +>x30 : string +>callr(sn, (x, y) => x + y) : string +>callr : (args: T, f: (...args: T) => U) => U +>sn : [string, number] +>(x, y) => x + y : (x: string, y: number) => string +>x : string +>y : number +>x + y : string +>x : string +>y : number + +let x31 = callr(sn, f15); // string | number +>x31 : string | number +>callr(sn, f15) : string | number +>callr : (args: T, f: (...args: T) => U) => U +>sn : [string, number] +>f15 : (a: string, b: number) => string | number + +let x32 = callr(sn, f16); // string | number +>x32 : string | number +>callr(sn, f16) : string | number +>callr : (args: T, f: (...args: T) => U) => U +>sn : [string, number] +>f16 : (a: A, b: B) => A | B + function bind(f: (x: T, ...rest: U) => V, x: T) { >bind : (f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V >f : (x: T, ...rest: U) => V @@ -15,3 +519,280 @@ function bind(f: (x: T, ...rest: U) => V, x: T) { >...rest : unknown >rest : U } + +declare const f20: (x: number, y: string, z: boolean) => string[]; +>f20 : (x: number, y: string, z: boolean) => string[] +>x : number +>y : string +>z : boolean + +const f21 = bind(f20, 42); // (y: string, z: boolean) => string[] +>f21 : (y: string, z: boolean) => string[] +>bind(f20, 42) : (y: string, z: boolean) => string[] +>bind : (f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V +>f20 : (x: number, y: string, z: boolean) => string[] +>42 : 42 + +const f22 = bind(f21, "hello"); // (z: boolean) => string[] +>f22 : (z: boolean) => string[] +>bind(f21, "hello") : (z: boolean) => string[] +>bind : (f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V +>f21 : (y: string, z: boolean) => string[] +>"hello" : "hello" + +const f23 = bind(f22, true); // () => string[] +>f23 : () => string[] +>bind(f22, true) : () => string[] +>bind : (f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V +>f22 : (z: boolean) => string[] +>true : true + +f20(42, "hello", true); +>f20(42, "hello", true) : string[] +>f20 : (x: number, y: string, z: boolean) => string[] +>42 : 42 +>"hello" : "hello" +>true : true + +f21("hello", true); +>f21("hello", true) : string[] +>f21 : (y: string, z: boolean) => string[] +>"hello" : "hello" +>true : true + +f22(true); +>f22(true) : string[] +>f22 : (z: boolean) => string[] +>true : true + +f23(); +>f23() : string[] +>f23 : () => string[] + +declare const g20: (x: number, y?: string, z?: boolean) => string[]; +>g20 : (x: number, y?: string | undefined, z?: boolean | undefined) => string[] +>x : number +>y : string | undefined +>z : boolean | undefined + +const g21 = bind(g20, 42); // (y: string, z: boolean) => string[] +>g21 : (y?: string | undefined, z?: boolean | undefined) => string[] +>bind(g20, 42) : (y?: string | undefined, z?: boolean | undefined) => string[] +>bind : (f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V +>g20 : (x: number, y?: string | undefined, z?: boolean | undefined) => string[] +>42 : 42 + +const g22 = bind(g21, "hello"); // (z: boolean) => string[] +>g22 : (z?: boolean | undefined) => string[] +>bind(g21, "hello") : (z?: boolean | undefined) => string[] +>bind : (f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V +>g21 : (y?: string | undefined, z?: boolean | undefined) => string[] +>"hello" : "hello" + +const g23 = bind(g22, true); // () => string[] +>g23 : () => string[] +>bind(g22, true) : () => string[] +>bind : (f: (x: T, ...rest: U) => V, x: T) => (...rest: U) => V +>g22 : (z?: boolean | undefined) => string[] +>true : true + +g20(42, "hello", true); +>g20(42, "hello", true) : string[] +>g20 : (x: number, y?: string | undefined, z?: boolean | undefined) => string[] +>42 : 42 +>"hello" : "hello" +>true : true + +g20(42, "hello"); +>g20(42, "hello") : string[] +>g20 : (x: number, y?: string | undefined, z?: boolean | undefined) => string[] +>42 : 42 +>"hello" : "hello" + +g20(42); +>g20(42) : string[] +>g20 : (x: number, y?: string | undefined, z?: boolean | undefined) => string[] +>42 : 42 + +g21("hello", true); +>g21("hello", true) : string[] +>g21 : (y?: string | undefined, z?: boolean | undefined) => string[] +>"hello" : "hello" +>true : true + +g21("hello"); +>g21("hello") : string[] +>g21 : (y?: string | undefined, z?: boolean | undefined) => string[] +>"hello" : "hello" + +g21(); +>g21() : string[] +>g21 : (y?: string | undefined, z?: boolean | undefined) => string[] + +g22(true); +>g22(true) : string[] +>g22 : (z?: boolean | undefined) => string[] +>true : true + +g22(); +>g22() : string[] +>g22 : (z?: boolean | undefined) => string[] + +g23(); +>g23() : string[] +>g23 : () => string[] + +declare function f30 any)[]>(x: T, ...args: U): U; +>f30 : any)[]>(x: T, ...args: U) => U +>x : T +>x : T +>args : U + +const c30 = f30(42, x => "" + x, x => x + 1); // [(x: number) => string, (x: number) => number] +>c30 : [(x: number) => string, (x: number) => number] +>f30(42, x => "" + x, x => x + 1) : [(x: number) => string, (x: number) => number] +>f30 : any)[]>(x: T, ...args: U) => U +>42 : 42 +>x => "" + x : (x: number) => string +>x : number +>"" + x : string +>"" : "" +>x : number +>x => x + 1 : (x: number) => number +>x : number +>x + 1 : number +>x : number +>1 : 1 + +type T01 = Parameters<(x: number, y: string, z: boolean) => void>; +>T01 : [x: number, y: string, z: boolean] +>x : number +>y : string +>z : boolean + +type T02 = Parameters<(...args: [number, string, boolean]) => void>; +>T02 : [number, string, boolean] +>args : [number, string, boolean] + +type T03 = ConstructorParameters void>; +>T03 : [x: number, y: string, z: boolean] +>x : number +>y : string +>z : boolean + +type T04 = ConstructorParameters void>; +>T04 : [number, string, boolean] +>args : [number, string, boolean] + +type T05 = Parameters<(...args: T[]) => void>; +>T05 : T[] +>args : T[] + +type T06 = ConstructorParameters void>; +>T06 : [] +>args : [] + +type T07 = Parameters<(...args: T) => void>; +>T07 : T +>args : T + +type T08 = ConstructorParameters void>; +>T08 : T +>args : T + +type T09 = Parameters; +>T09 : never + +type Record1 = { +>Record1 : Record1 + + move: [number, 'left' | 'right']; +>move : [number, "left" | "right"] + + jump: [number, 'up' | 'down']; +>jump : [number, "up" | "down"] + + stop: string; +>stop : string + + done: []; +>done : [] +} + +type EventType = { +>EventType : EventType + + emit(e: K, ...payload: T[K] extends any[] ? T[K] : [T[K]]): void; +>emit : (e: K, ...payload: T[K] extends any[] ? T[K] : [T[K]]) => void +>e : K +>payload : T[K] extends any[] ? T[K] : [T[K]] +} + +declare var events: EventType; +>events : EventType + +events.emit('move', 10, 'left'); +>events.emit('move', 10, 'left') : void +>events.emit : (e: K, ...payload: Record1[K] extends any[] ? Record1[K] : [Record1[K]]) => void +>events : EventType +>emit : (e: K, ...payload: Record1[K] extends any[] ? Record1[K] : [Record1[K]]) => void +>'move' : "move" +>10 : 10 +>'left' : "left" + +events.emit('jump', 20, 'up'); +>events.emit('jump', 20, 'up') : void +>events.emit : (e: K, ...payload: Record1[K] extends any[] ? Record1[K] : [Record1[K]]) => void +>events : EventType +>emit : (e: K, ...payload: Record1[K] extends any[] ? Record1[K] : [Record1[K]]) => void +>'jump' : "jump" +>20 : 20 +>'up' : "up" + +events.emit('stop', 'Bye!'); +>events.emit('stop', 'Bye!') : void +>events.emit : (e: K, ...payload: Record1[K] extends any[] ? Record1[K] : [Record1[K]]) => void +>events : EventType +>emit : (e: K, ...payload: Record1[K] extends any[] ? Record1[K] : [Record1[K]]) => void +>'stop' : "stop" +>'Bye!' : "Bye!" + +events.emit('done'); +>events.emit('done') : void +>events.emit : (e: K, ...payload: Record1[K] extends any[] ? Record1[K] : [Record1[K]]) => void +>events : EventType +>emit : (e: K, ...payload: Record1[K] extends any[] ? Record1[K] : [Record1[K]]) => void +>'done' : "done" + +// Repro from #25871 + +declare var ff1: (... args: any[]) => void; +>ff1 : (...args: any[]) => void +>args : any[] + +declare var ff2: () => void; +>ff2 : () => void + +declare var ff3: (...args: []) => void; +>ff3 : () => void +>args : [] + +declare var ff4: (a: never) => void; +>ff4 : (a: never) => void +>a : never + +ff1 = ff2; +>ff1 = ff2 : () => void +>ff1 : (...args: any[]) => void +>ff2 : () => void + +ff1 = ff3; +>ff1 = ff3 : () => void +>ff1 : (...args: any[]) => void +>ff3 : () => void + +ff1 = ff4; // Error +>ff1 = ff4 : (a: never) => void +>ff1 : (...args: any[]) => void +>ff4 : (a: never) => void + diff --git a/tests/cases/conformance/types/rest/genericRestParameters1.ts b/tests/cases/conformance/types/rest/genericRestParameters1.ts index cae7b5a35f179..ede07b0d9ac58 100644 --- a/tests/cases/conformance/types/rest/genericRestParameters1.ts +++ b/tests/cases/conformance/types/rest/genericRestParameters1.ts @@ -1,6 +1,167 @@ // @strict: true // @declaration: true +declare let f1: (...x: [number, string, boolean]) => void; +declare let f2: (x0: number, x1: string, x2: boolean) => void; + +f1 = f2; +f2 = f1; + +declare const t3: [number, string, boolean]; +declare const t2: [string, boolean]; +declare const t1: [boolean]; +declare const t0: []; + +declare const ns: [number, string]; +declare const sn: [string, number]; + +f1(42, "hello", true); +f1(t3[0], t3[1], t3[2]); +f1(...t3); +f1(42, ...t2); +f1(42, "hello", ...t1); +f1(42, "hello", true, ...t0); +f1(ns[0], ns[1], true); +f1(...ns, true); // FIXME: Error, since ...ns is considered as string|number here + +f2(42, "hello", true); +f2(t3[0], t3[1], t3[2]); +f2(...t3); +f2(42, ...t2); +f2(42, "hello", ...t1); +f2(42, "hello", true, ...t0); +f2(ns[0], ns[1], true); +f2(...ns, true); // FIXME: Error, since ...ns is considered as string|number here + +declare function f10(...args: T): T; + +const x10 = f10(42, "hello", true); // [number, string, boolean] +const x11 = f10(42, "hello"); // [number, string] +const x12 = f10(42); // [number] +const x13 = f10(); // [] +const x14 = f10(...t3); // [number, string, boolean] +const x15 = f10(42, ...t2); // [number, string, boolean] +const x16 = f10(42, "hello", ...t1); // [number, string, boolean] +const x17 = f10(42, "hello", true, ...t0); // [number, string, boolean] +const x18 = f10(...ns, true); // (string | number | boolean)[] + +function g10(u: U, v: V) { + let x1 = f10(...u); // U + let x2 = f10(...v); // V + let x3 = f10(1, ...u); // [number, ...string[]] + let x4 = f10(...u, ...v); // (string | number)[] +} + +declare function f11(...args: T): T; + +const z10 = f11(42, "hello", true); // [42, "hello", true] +const z11 = f11(42, "hello"); // [42, "hello"] +const z12 = f11(42); // [42] +const z13 = f11(); // [] +const z14 = f11(...t3); // [number, string, boolean] +const z15 = f11(42, ...t2); // [42, string, boolean] +const z16 = f11(42, "hello", ...t1); // [42, "hello", boolean] +const z17 = f11(42, "hello", true, ...t0); // [42, "hello", true] +const z18 = f11(...ns, true); // (string | number | true)[] + +function g11(u: U, v: V) { + let x1 = f11(...u); // U + let x2 = f11(...v); // V + let x3 = f11(1, ...u); // [1, ...string[]] + let x4 = f11(...u, ...v); // (string | number)[] +} + +function call(f: (...args: T) => U, ...args: T) { + return f(...args); +} + +function callr(args: T, f: (...args: T) => U) { + return f(...args); +} + +declare function f15(a: string, b: number): string | number; +declare function f16(a: A, b: B): A | B; + +let x20 = call((x, y) => x + y, 10, 20); // number +let x21 = call((x, y) => x + y, 10, "hello"); // string +let x22 = call(f15, "hello", 42); // string | number +let x23 = call(f16, "hello", 42); // unknown +let x24 = call<[string, number], string | number>(f16, "hello", 42); // string | number + +let x30 = callr(sn, (x, y) => x + y); // string +let x31 = callr(sn, f15); // string | number +let x32 = callr(sn, f16); // string | number + function bind(f: (x: T, ...rest: U) => V, x: T) { return (...rest: U) => f(x, ...rest); -} \ No newline at end of file +} + +declare const f20: (x: number, y: string, z: boolean) => string[]; + +const f21 = bind(f20, 42); // (y: string, z: boolean) => string[] +const f22 = bind(f21, "hello"); // (z: boolean) => string[] +const f23 = bind(f22, true); // () => string[] + +f20(42, "hello", true); +f21("hello", true); +f22(true); +f23(); + +declare const g20: (x: number, y?: string, z?: boolean) => string[]; + +const g21 = bind(g20, 42); // (y: string, z: boolean) => string[] +const g22 = bind(g21, "hello"); // (z: boolean) => string[] +const g23 = bind(g22, true); // () => string[] + +g20(42, "hello", true); +g20(42, "hello"); +g20(42); +g21("hello", true); +g21("hello"); +g21(); +g22(true); +g22(); +g23(); + +declare function f30 any)[]>(x: T, ...args: U): U; + +const c30 = f30(42, x => "" + x, x => x + 1); // [(x: number) => string, (x: number) => number] + +type T01 = Parameters<(x: number, y: string, z: boolean) => void>; +type T02 = Parameters<(...args: [number, string, boolean]) => void>; +type T03 = ConstructorParameters void>; +type T04 = ConstructorParameters void>; +type T05 = Parameters<(...args: T[]) => void>; +type T06 = ConstructorParameters void>; +type T07 = Parameters<(...args: T) => void>; +type T08 = ConstructorParameters void>; +type T09 = Parameters; + +type Record1 = { + move: [number, 'left' | 'right']; + jump: [number, 'up' | 'down']; + stop: string; + done: []; +} + +type EventType = { + emit(e: K, ...payload: T[K] extends any[] ? T[K] : [T[K]]): void; +} + +declare var events: EventType; +events.emit('move', 10, 'left'); +events.emit('jump', 20, 'up'); +events.emit('stop', 'Bye!'); +events.emit('done'); + +// Repro from #25871 + +declare var ff1: (... args: any[]) => void; + +declare var ff2: () => void; +declare var ff3: (...args: []) => void; +declare var ff4: (a: never) => void; + +ff1 = ff2; +ff1 = ff3; +ff1 = ff4; // Error From 30cfc5d2841587b0b8940474d4593cfe1f8f101a Mon Sep 17 00:00:00 2001 From: kingwl Date: Thu, 23 Jul 2020 17:18:33 +0800 Subject: [PATCH 6/7] Fix some case --- src/compiler/checker.ts | 55 ++++++++++++------- src/compiler/transformers/es2015.ts | 16 +++--- .../destructuringParameterDeclaration4.js | 4 ++ .../reference/mixinClassesAnnotated.js | 4 ++ .../reference/mixinClassesAnonymous.js | 4 ++ tests/baselines/reference/parser509668.js | 4 ++ tests/baselines/reference/variadicTuples1.js | 24 +------- 7 files changed, 61 insertions(+), 50 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c9f3ae8dd5551..aebfcd8611e69 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -22101,27 +22101,7 @@ namespace ts { return getTypeOfSymbol(symbol); } - if ((symbol.flags & SymbolFlags.Value) && symbol.valueDeclaration && symbol.valueDeclaration !== node.parent && - isParameter(symbol.valueDeclaration) && isRestParameter(symbol.valueDeclaration) && - !(symbol.valueDeclaration.flags & NodeFlags.RestParameterMustEmitAtTop)) { - const containerFunctionLikeDeclaration = findAncestor(symbol.valueDeclaration, isFunctionLikeDeclaration); - if (containerFunctionLikeDeclaration) { - let insideOtherFunctionLikeScope = false; - const topLevelStatementInContainer = findAncestor(node, n => { - if (isFunctionLikeDeclaration(n)) { - insideOtherFunctionLikeScope = true; - return "quit"; - } - return n.parent && (isBlock(n.parent) ? n.parent.parent === containerFunctionLikeDeclaration : n.parent === containerFunctionLikeDeclaration); - }); - if (insideOtherFunctionLikeScope) { - (>symbol.valueDeclaration).flags |= NodeFlags.RestParameterMustEmitAtTop; - } - else if(topLevelStatementInContainer) { - (>topLevelStatementInContainer).flags |= NodeFlags.ContainsRestParameterReference; - } - } - } + checkIdentifierForRestParameter(node, symbol); // We should only mark aliases as referenced if there isn't a local value declaration // for the symbol. Also, don't mark any property access expression LHS - checkPropertyAccessExpression will handle that @@ -22263,6 +22243,36 @@ namespace ts { return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType; } + function checkIdentifierForRestParameter(node: Identifier, symbol: Symbol) { + if ((symbol.flags & SymbolFlags.Value) && symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && + (symbol.valueDeclaration !== node.parent || isParameterPropertyDeclaration(symbol.valueDeclaration, symbol.valueDeclaration.parent)) && + isRestParameter(symbol.valueDeclaration) && !(symbol.valueDeclaration.flags & NodeFlags.RestParameterMustEmitAtTop)) { + const containerFunctionLikeDeclaration = findAncestor(symbol.valueDeclaration, isFunctionLikeDeclaration); + if (containerFunctionLikeDeclaration) { + const mutableValueDeclaration = >symbol.valueDeclaration; + if (isParameterPropertyDeclaration(symbol.valueDeclaration, symbol.valueDeclaration.parent)) { + mutableValueDeclaration.flags |= NodeFlags.RestParameterMustEmitAtTop; + } + else { + let insideOtherFunctionLikeScope = false; + const topLevelStatementInContainer = findAncestor(node, n => { + if (isFunctionLikeDeclaration(n)) { + insideOtherFunctionLikeScope = true; + return "quit"; + } + return n.parent && (isBlock(n.parent) ? n.parent.parent === containerFunctionLikeDeclaration : n.parent === containerFunctionLikeDeclaration); + }); + if (insideOtherFunctionLikeScope) { + mutableValueDeclaration.flags |= NodeFlags.RestParameterMustEmitAtTop; + } + else if(topLevelStatementInContainer) { + (>topLevelStatementInContainer).flags |= NodeFlags.ContainsRestParameterReference; + } + } + } + } + } + function isInsideFunction(node: Node, threshold: Node): boolean { return !!findAncestor(node, n => n === threshold ? "quit" : isFunctionLike(n)); } @@ -30326,6 +30336,9 @@ namespace ts { checkVariableLikeDeclaration(node); const func = getContainingFunction(node)!; if (hasSyntacticModifier(node, ModifierFlags.ParameterPropertyModifier)) { + if (isIdentifier(node.name)) { + checkIdentifierForRestParameter(node.name, getResolvedSymbol(node.name)); + } if (!(func.kind === SyntaxKind.Constructor && nodeIsPresent(func.body))) { error(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index 8ec3503ab055e..142de66d01b45 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -1056,8 +1056,7 @@ namespace ts { // Since the `super()` call was the first statement, we insert the `this` capturing call to // `super()` at the top of the list of `statements` (after any pre-existing custom prologues). - insertCaptureThisForNode(statements, constructor, superCallExpression || createActualThis()); - + insertCaptureThisForNode(statements, constructor, superCallExpression || createActualThis(), superCallStatement); if (!isSufficientlyCoveredByReturnStatements(constructor.body)) { statements.push(factory.createReturnStatement(factory.createUniqueName("_this", GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel))); } @@ -1457,9 +1456,9 @@ namespace ts { insertStatementsAfterCustomPrologue(statements, prologueStatements); } else { - const idx = statements.indexOf(firstStatementContainsRestParameter) - Debug.assert(idx > -1) - statements.splice(idx, 0, ...prologueStatements) + const idx = statements.indexOf(firstStatementContainsRestParameter); + Debug.assert(idx > -1); + statements.splice(idx, 0, ...prologueStatements); } return true; } @@ -1473,13 +1472,13 @@ namespace ts { */ function insertCaptureThisForNodeIfNeeded(statements: Statement[], node: Node): boolean { if (hierarchyFacts & HierarchyFacts.CapturedLexicalThis && node.kind !== SyntaxKind.ArrowFunction) { - insertCaptureThisForNode(statements, node, factory.createThis()); + insertCaptureThisForNode(statements, node, factory.createThis(), /* originalNode */ undefined); return true; } return false; } - function insertCaptureThisForNode(statements: Statement[], node: Node, initializer: Expression | undefined): void { + function insertCaptureThisForNode(statements: Statement[], node: Node, initializer: Expression | undefined, originalNode: Node | undefined): void { enableSubstitutionsForCapturedThis(); const captureThisStatement = factory.createVariableStatement( /*modifiers*/ undefined, @@ -1493,6 +1492,7 @@ namespace ts { ]) ); setEmitFlags(captureThisStatement, EmitFlags.NoComments | EmitFlags.CustomPrologue); + setOriginalNode(captureThisStatement, originalNode); setSourceMapRange(captureThisStatement, node); insertStatementAfterCustomPrologue(statements, captureThisStatement); } @@ -1930,7 +1930,7 @@ namespace ts { const expression = visitNode(body, visitor, isExpression); const returnStatement = factory.createReturnStatement(expression); - setOriginalNode(returnStatement, expression) + setOriginalNode(returnStatement, expression); setTextRange(returnStatement, body); moveSyntheticComments(returnStatement, body); setEmitFlags(returnStatement, EmitFlags.NoTokenSourceMaps | EmitFlags.NoTrailingSourceMap | EmitFlags.NoTrailingComments); diff --git a/tests/baselines/reference/destructuringParameterDeclaration4.js b/tests/baselines/reference/destructuringParameterDeclaration4.js index 8f4ea1f2ced78..79d1d6bfe3916 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration4.js +++ b/tests/baselines/reference/destructuringParameterDeclaration4.js @@ -59,6 +59,10 @@ a6([1, 2, "string"]); // Error, parameter type is number[] var temp = [1, 2, 3]; var C = /** @class */ (function () { function C() { + var temp = []; + for (var _i = 0; _i < arguments.length; _i++) { + temp[_i] = arguments[_i]; + } this.temp = temp; } // Error, rest parameter can't have properties return C; diff --git a/tests/baselines/reference/mixinClassesAnnotated.js b/tests/baselines/reference/mixinClassesAnnotated.js index 097912c20d717..f8ee303d1aad8 100644 --- a/tests/baselines/reference/mixinClassesAnnotated.js +++ b/tests/baselines/reference/mixinClassesAnnotated.js @@ -112,6 +112,10 @@ function Tagged(superClass) { var C = /** @class */ (function (_super) { __extends(C, _super); function C() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } var _this = _super.apply(this, args) || this; _this._tag = "hello"; return _this; diff --git a/tests/baselines/reference/mixinClassesAnonymous.js b/tests/baselines/reference/mixinClassesAnonymous.js index a740289f79332..f06e47db7e035 100644 --- a/tests/baselines/reference/mixinClassesAnonymous.js +++ b/tests/baselines/reference/mixinClassesAnonymous.js @@ -111,6 +111,10 @@ function Tagged(superClass) { var C = /** @class */ (function (_super) { __extends(C, _super); function C() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } var _this = _super.apply(this, args) || this; _this._tag = "hello"; return _this; diff --git a/tests/baselines/reference/parser509668.js b/tests/baselines/reference/parser509668.js index 2f8acbb92738b..6864244e2761d 100644 --- a/tests/baselines/reference/parser509668.js +++ b/tests/baselines/reference/parser509668.js @@ -8,6 +8,10 @@ class Foo3 { var Foo3 = /** @class */ (function () { // Doesn't work, but should function Foo3() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } this.args = args; } return Foo3; diff --git a/tests/baselines/reference/variadicTuples1.js b/tests/baselines/reference/variadicTuples1.js index b75ffcb37009d..fa21d941a6b44 100644 --- a/tests/baselines/reference/variadicTuples1.js +++ b/tests/baselines/reference/variadicTuples1.js @@ -533,24 +533,12 @@ var c1 = curry(fn1, 1); // (b: string, c: boolean, d: string[]) => number var c2 = curry(fn1, 1, 'abc'); // (c: boolean, d: string[]) => number var c3 = curry(fn1, 1, 'abc', true); // (d: string[]) => number var c4 = curry(fn1, 1, 'abc', true, ['x', 'y']); // () => number -var fn2 = function (x, b) { - var args = []; - for (var _i = 2; _i < arguments.length; _i++) { - args[_i - 2] = arguments[_i]; - } - return 0; -}; +var fn2 = function (x, b) { return 0; }; var c10 = curry(fn2); // (x: number, b: boolean, ...args: string[]) => number var c11 = curry(fn2, 1); // (b: boolean, ...args: string[]) => number var c12 = curry(fn2, 1, true); // (...args: string[]) => number var c13 = curry(fn2, 1, true, 'abc', 'def'); // (...args: string[]) => number -var fn3 = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return 0; -}; +var fn3 = function () { return 0; }; var c20 = curry(fn3); // (...args: string[]) => number var c21 = curry(fn3, 'abc', 'def'); // (...args: string[]) => number var c22 = curry.apply(void 0, __spreadArrays([fn3], sa)); // (...args: string[]) => number @@ -563,13 +551,7 @@ curry2(fn10, ['hello'], [42, true]); call('hello', 32, function (a, b) { return 42; }); // Would be nice to infer [...string[], (...args: string[]) => number] here // Requires [starting-fixed-part, ...rest-part, ending-fixed-part] tuple structure -call.apply(void 0, __spreadArrays(sa, [function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i] = arguments[_i]; - } - return 42; - }])); +call.apply(void 0, __spreadArrays(sa, [function () { return 42; }])); function f21(args) { var v1 = f20(args); // U var v2 = f20(["foo", "bar"]); // [] From 4112a7b537cbbcedb81b4490fa932b49ef3c4ca4 Mon Sep 17 00:00:00 2001 From: kingwl Date: Thu, 23 Jul 2020 17:29:53 +0800 Subject: [PATCH 7/7] accept baseline --- tests/baselines/reference/mixinPrivateAndProtected.js | 4 ++++ tests/baselines/reference/mixingApparentTypeOverrides.js | 4 ++++ tests/baselines/reference/restParamModifier2.js | 4 ++++ tests/baselines/reference/varArgConstructorMemberParameter.js | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/tests/baselines/reference/mixinPrivateAndProtected.js b/tests/baselines/reference/mixinPrivateAndProtected.js index 9af5f0cb681dd..c94ee6c944361 100644 --- a/tests/baselines/reference/mixinPrivateAndProtected.js +++ b/tests/baselines/reference/mixinPrivateAndProtected.js @@ -176,6 +176,10 @@ function PersonMixin(Base) { return /** @class */ (function (_super) { __extends(class_4, _super); function class_4() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } return _super.apply(this, args) || this; } class_4.prototype.myProtectedFunction = function () { diff --git a/tests/baselines/reference/mixingApparentTypeOverrides.js b/tests/baselines/reference/mixingApparentTypeOverrides.js index 858862ad3c12e..d790b39ab4aa7 100644 --- a/tests/baselines/reference/mixingApparentTypeOverrides.js +++ b/tests/baselines/reference/mixingApparentTypeOverrides.js @@ -46,6 +46,10 @@ function Tagged(Base) { return /** @class */ (function (_super) { __extends(class_1, _super); function class_1() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } var _this = _super.apply(this, args) || this; _this._tag = ""; return _this; diff --git a/tests/baselines/reference/restParamModifier2.js b/tests/baselines/reference/restParamModifier2.js index 0de1f12c6ee16..50b91b302c6b0 100644 --- a/tests/baselines/reference/restParamModifier2.js +++ b/tests/baselines/reference/restParamModifier2.js @@ -6,6 +6,10 @@ class C { //// [restParamModifier2.js] var C = /** @class */ (function () { function C() { + var rest = []; + for (var _i = 0; _i < arguments.length; _i++) { + rest[_i] = arguments[_i]; + } this.rest = rest; } return C; diff --git a/tests/baselines/reference/varArgConstructorMemberParameter.js b/tests/baselines/reference/varArgConstructorMemberParameter.js index b0f3b46db9a3f..ef15703c32e2f 100644 --- a/tests/baselines/reference/varArgConstructorMemberParameter.js +++ b/tests/baselines/reference/varArgConstructorMemberParameter.js @@ -26,6 +26,10 @@ var Foo2 = /** @class */ (function () { }()); var Foo3 = /** @class */ (function () { function Foo3() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } this.args = args; } return Foo3;