Fix array spread with sideeffects (#41523)

* Fix array spread with sideeffects

* Minor cleanup, ensure multiple emit helpers for outfile tests
This commit is contained in:
Ron Buckton authored and GitHub committed 2021-01-05 17:24:21 -08:00
1 parent 7a5aadca69
commit 44ec8ddaee
55 files changed
+5253 -4282

No files matched your search

+3 -4
View File
@@ -24695,7 +24695,7 @@ namespace ts {
function checkSpreadExpression(node: SpreadElement, checkMode?: CheckMode): Type {
if (languageVersion < ScriptTarget.ES2015) {
checkExternalEmitHelpers(node, compilerOptions.downlevelIteration ? ExternalEmitHelpers.SpreadIncludes : ExternalEmitHelpers.SpreadArrays);
checkExternalEmitHelpers(node, compilerOptions.downlevelIteration ? ExternalEmitHelpers.SpreadIncludes : ExternalEmitHelpers.SpreadArray);
}
const arrayOrIterableType = checkExpression(node.expression, checkMode);
@@ -24723,7 +24723,7 @@ namespace ts {
const e = elements[i];
if (e.kind === SyntaxKind.SpreadElement) {
if (languageVersion < ScriptTarget.ES2015) {
checkExternalEmitHelpers(e, compilerOptions.downlevelIteration ? ExternalEmitHelpers.SpreadIncludes : ExternalEmitHelpers.SpreadArrays);
checkExternalEmitHelpers(e, compilerOptions.downlevelIteration ? ExternalEmitHelpers.SpreadIncludes : ExternalEmitHelpers.SpreadArray);
}
const spreadType = checkExpression((<SpreadElement>e).expression, checkMode, forceTuple);
if (isArrayLikeType(spreadType)) {
@@ -39048,8 +39048,7 @@ namespace ts {
case ExternalEmitHelpers.Generator: return "__generator";
case ExternalEmitHelpers.Values: return "__values";
case ExternalEmitHelpers.Read: return "__read";
case ExternalEmitHelpers.Spread: return "__spread";
case ExternalEmitHelpers.SpreadArrays: return "__spreadArrays";
case ExternalEmitHelpers.SpreadArray: return "__spreadArray";
case ExternalEmitHelpers.Await: return "__await";
case ExternalEmitHelpers.AsyncGenerator: return "__asyncGenerator";
case ExternalEmitHelpers.AsyncDelegator: return "__asyncDelegator";
+21 -41
View File
@@ -19,8 +19,7 @@ namespace ts {
// ES2015 Helpers
createExtendsHelper(name: Identifier): Expression;
createTemplateObjectHelper(cooked: ArrayLiteralExpression, raw: ArrayLiteralExpression): Expression;
createSpreadHelper(argumentList: readonly Expression[]): Expression;
createSpreadArraysHelper(argumentList: readonly Expression[]): Expression;
createSpreadArrayHelper(to: Expression, from: Expression): Expression;
// ES2015 Destructuring Helpers
createValuesHelper(expression: Expression): Expression;
createReadHelper(iteratorRecord: Expression, count: number | undefined): Expression;
@@ -58,8 +57,7 @@ namespace ts {
// ES2015 Helpers
createExtendsHelper,
createTemplateObjectHelper,
createSpreadHelper,
createSpreadArraysHelper,
createSpreadArrayHelper,
// ES2015 Destructuring Helpers
createValuesHelper,
createReadHelper,
@@ -284,22 +282,12 @@ namespace ts {
);
}
function createSpreadHelper(argumentList: readonly Expression[]) {
context.requestEmitHelper(readHelper);
context.requestEmitHelper(spreadHelper);
function createSpreadArrayHelper(to: Expression, from: Expression) {
context.requestEmitHelper(spreadArrayHelper);
return factory.createCallExpression(
getUnscopedHelperName("__spread"),
getUnscopedHelperName("__spreadArray"),
/*typeArguments*/ undefined,
argumentList
);
}
function createSpreadArraysHelper(argumentList: readonly Expression[]) {
context.requestEmitHelper(spreadArraysHelper);
return factory.createCallExpression(
getUnscopedHelperName("__spreadArrays"),
/*typeArguments*/ undefined,
argumentList
[to, from]
);
}
@@ -629,29 +617,15 @@ namespace ts {
};`
};
export const spreadHelper: UnscopedEmitHelper = {
name: "typescript:spread",
importName: "__spread",
scoped: false,
dependencies: [readHelper],
text: `
var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
};`
};
export const spreadArraysHelper: UnscopedEmitHelper = {
name: "typescript:spreadArrays",
importName: "__spreadArrays",
export const spreadArrayHelper: UnscopedEmitHelper = {
name: "typescript:spreadArray",
importName: "__spreadArray",
scoped: false,
text: `
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};`
};
@@ -886,8 +860,7 @@ namespace ts {
awaiterHelper,
extendsHelper,
templateObjectHelper,
spreadHelper,
spreadArraysHelper,
spreadArrayHelper,
valuesHelper,
readHelper,
generatorHelper,
@@ -917,4 +890,11 @@ namespace ts {
return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });
})(name => super[name], (name, value) => super[name] = value);`
};
export function isCallToHelper(firstSegment: Expression, helperName: __String) {
return isCallExpression(firstSegment)
&& isIdentifier(firstSegment.expression)
&& (getEmitFlags(firstSegment.expression) & EmitFlags.HelperName)
&& firstSegment.expression.escapedText === helperName;
}
}
+48 -34
View File
@@ -3892,17 +3892,41 @@ namespace ts {
*
* @param elements The array of Expression nodes.
* @param needsUniqueCopy A value indicating whether to ensure that the result is a fresh array.
* This should be `true` when spreading into an `ArrayLiteral`, and `false` when spreading into an
* argument list.
* @param multiLine A value indicating whether the result should be emitted on multiple lines.
*/
function transformAndSpreadElements(elements: NodeArray<Expression>, needsUniqueCopy: boolean, multiLine: boolean, hasTrailingComma: boolean): Expression {
// When there is no leading SpreadElement:
//
// [source]
// [a, ...b, c]
//
// [output (downlevelIteration)]
// __spread([a], b, [c])
// __spreadArray(__spreadArray([a], __read(b)), [c])
//
// [output]
// __spreadArrays([a], b, [c])
// __spreadArray(__spreadArray([a], b), [c])
//
// When there *is* a leading SpreadElement:
//
// [source]
// [...a, b]
//
// [output (downlevelIteration)]
// __spreadArray(__spreadArray([], __read(a)), [b])
//
// [output]
// __spreadArray(__spreadArray([], a), [b])
//
// NOTE: We use `isPackedArrayLiteral` below rather than just `isArrayLiteral`
// because ES2015 spread will replace _missing_ array elements with `undefined`,
// so we cannot just use an array as is. For example:
//
// `[1, ...[2, , 3]]` becomes `[1, 2, undefined, 3]`
//
// However, for packed array literals (i.e., an array literal with no OmittedExpression
// elements), we can use the array as-is.
// Map spans of spread expressions into their expressions and spans of other
// expressions into an array literal.
@@ -3913,43 +3937,33 @@ namespace ts {
)
);
if (compilerOptions.downlevelIteration) {
if (segments.length === 1) {
const firstSegment = segments[0];
if (isCallToHelper(firstSegment, "___spread" as __String)) {
return segments[0];
}
if (segments.length === 1) {
const firstSegment = segments[0];
// If we don't need a unique copy, then we are spreading into an argument list for
// a CallExpression or NewExpression. When using `--downlevelIteration`, we need
// to coerce this into an array for use with `apply`, so we will use the code path
// that follows instead.
if (!needsUniqueCopy && !compilerOptions.downlevelIteration
|| isPackedArrayLiteral(firstSegment) // see NOTE (above)
|| isCallToHelper(firstSegment, "___spreadArray" as __String)) {
return segments[0];
}
return emitHelpers().createSpreadHelper(segments);
}
else {
if (segments.length === 1) {
const firstSegment = segments[0];
if (!needsUniqueCopy
|| isPackedArrayLiteral(firstSegment)
|| isCallToHelper(firstSegment, "___spreadArrays" as __String)) {
return segments[0];
}
}
return emitHelpers().createSpreadArraysHelper(segments);
const helpers = emitHelpers();
const startsWithSpread = isSpreadElement(elements[0]);
let expression: Expression =
startsWithSpread ? factory.createArrayLiteralExpression() :
segments[0];
for (let i = startsWithSpread ? 0 : 1; i < segments.length; i++) {
expression = helpers.createSpreadArrayHelper(
expression,
compilerOptions.downlevelIteration && !isPackedArrayLiteral(segments[i]) ? // see NOTE (above)
helpers.createReadHelper(segments[i], /*count*/ undefined) :
segments[i]);
}
}
function isPackedElement(node: Expression) {
return !isOmittedExpression(node);
}
function isPackedArrayLiteral(node: Expression) {
return isArrayLiteralExpression(node) && every(node.elements, isPackedElement);
}
function isCallToHelper(firstSegment: Expression, helperName: __String) {
return isCallExpression(firstSegment)
&& isIdentifier(firstSegment.expression)
&& (getEmitFlags(firstSegment.expression) & EmitFlags.HelperName)
&& firstSegment.expression.escapedText === helperName;
return expression;
}
function partitionSpread(node: Expression) {
+13 -15
View File
@@ -6605,19 +6605,18 @@ namespace ts {
Generator = 1 << 7, // __generator (used by ES2015 generator transformation)
Values = 1 << 8, // __values (used by ES2015 for..of and yield* transformations)
Read = 1 << 9, // __read (used by ES2015 iterator destructuring transformation)
Spread = 1 << 10, // __spread (used by ES2015 array spread and argument list spread transformations)
SpreadArrays = 1 << 11, // __spreadArrays (used by ES2015 array spread and argument list spread transformations)
Await = 1 << 12, // __await (used by ES2017 async generator transformation)
AsyncGenerator = 1 << 13, // __asyncGenerator (used by ES2017 async generator transformation)
AsyncDelegator = 1 << 14, // __asyncDelegator (used by ES2017 async generator yield* transformation)
AsyncValues = 1 << 15, // __asyncValues (used by ES2017 for..await..of transformation)
ExportStar = 1 << 16, // __exportStar (used by CommonJS/AMD/UMD module transformation)
ImportStar = 1 << 17, // __importStar (used by CommonJS/AMD/UMD module transformation)
ImportDefault = 1 << 18, // __importStar (used by CommonJS/AMD/UMD module transformation)
MakeTemplateObject = 1 << 19, // __makeTemplateObject (used for constructing template string array objects)
ClassPrivateFieldGet = 1 << 20, // __classPrivateFieldGet (used by the class private field transformation)
ClassPrivateFieldSet = 1 << 21, // __classPrivateFieldSet (used by the class private field transformation)
CreateBinding = 1 << 22, // __createBinding (use by the module transform for (re)exports and namespace imports)
SpreadArray = 1 << 10, // __spreadArray (used by ES2015 array spread and argument list spread transformations)
Await = 1 << 11, // __await (used by ES2017 async generator transformation)
AsyncGenerator = 1 << 12, // __asyncGenerator (used by ES2017 async generator transformation)
AsyncDelegator = 1 << 13, // __asyncDelegator (used by ES2017 async generator yield* transformation)
AsyncValues = 1 << 14, // __asyncValues (used by ES2017 for..await..of transformation)
ExportStar = 1 << 15, // __exportStar (used by CommonJS/AMD/UMD module transformation)
ImportStar = 1 << 16, // __importStar (used by CommonJS/AMD/UMD module transformation)
ImportDefault = 1 << 17, // __importStar (used by CommonJS/AMD/UMD module transformation)
MakeTemplateObject = 1 << 18, // __makeTemplateObject (used for constructing template string array objects)
ClassPrivateFieldGet = 1 << 19, // __classPrivateFieldGet (used by the class private field transformation)
ClassPrivateFieldSet = 1 << 20, // __classPrivateFieldSet (used by the class private field transformation)
CreateBinding = 1 << 21, // __createBinding (use by the module transform for (re)exports and namespace imports)
FirstEmitHelper = Extends,
LastEmitHelper = CreateBinding,
@@ -6634,8 +6633,7 @@ namespace ts {
AsyncDelegatorIncludes = Await | AsyncDelegator | AsyncValues,
// Helpers included by ES2015 spread
SpreadIncludes = Read | Spread,
SpreadIncludes = Read | SpreadArray,
}
export const enum EmitHint {
+11
View File
@@ -7033,6 +7033,17 @@ namespace ts {
}
}
function isPackedElement(node: Expression) {
return !isOmittedExpression(node);
}
/**
* Determines whether the provided node is an ArrayLiteralExpression that contains no missing elements.
*/
export function isPackedArrayLiteral(node: Expression) {
return isArrayLiteralExpression(node) && every(node.elements, isPackedElement);
}
/**
* Indicates whether the result of an `Expression` will be unused.
*
+2 -1
View File
@@ -615,7 +615,8 @@ const { b, ...rest } = { a: 10, b: 30, yy: 30 };
const content = fs.readFileSync(path, "utf8");
fs.writeFileSync(path, `${content}
function ${project}${file}Spread(...b: number[]) { }
${project}${file}Spread(...[10, 20, 30]);`);
const ${project}${file}_ar = [20, 30];
${project}${file}Spread(10, ...${project}${file}_ar);`);
replaceText(fs, `src/${project}/tsconfig.json`, `"strict": false,`, `"strict": false,
"downlevelIteration": true,`);
@@ -19,12 +19,10 @@ baz(["string", 1, true, ...array]); // Error
foo(o); // Error because x has an array type namely (string|number)[]
//// [argumentExpressionContextualTyping.js]
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
// In a typed function call, argument expressions are contextually typed by their corresponding parameter types.
function foo(_a) {
@@ -43,5 +41,5 @@ var tuple = ["string", 1, true];
baz(tuple);
baz(["string", 1, true]);
baz(array); // Error
baz(__spreadArrays(["string", 1, true], array)); // Error
baz(__spreadArray(["string", 1, true], array)); // Error
foo(o); // Error because x has an array type namely (string|number)[]
@@ -16,12 +16,10 @@ var spr2:[number, number, number] = [1, 2, 3, ...tup]; // Error
//// [arrayLiteralExpressionContextualTyping.js]
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
// In a contextually typed array literal expression containing no spread elements, an element expression at index N is contextually typed by
// the type of the property with the numeric name N in the contextual type, if any, or otherwise
@@ -33,6 +31,6 @@ var tup1 = [1, 2, 3, "string"];
var tup2 = [1, 2, 3, "string"]; // Error
// In a contextually typed array literal expression containing one or more spread elements,
// an element expression at index N is contextually typed by the numeric index type of the contextual type, if any.
var spr = __spreadArrays([1, 2, 3], array);
var spr1 = __spreadArrays([1, 2, 3], tup);
var spr2 = __spreadArrays([1, 2, 3], tup); // Error
var spr = __spreadArray([1, 2, 3], array);
var spr1 = __spreadArray([1, 2, 3], tup);
var spr2 = __spreadArray([1, 2, 3], tup); // Error
+13 -15
View File
@@ -24,27 +24,25 @@ function f2() {
//// [arrayLiteralSpread.js]
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
function f0() {
var a = [1, 2, 3];
var a1 = __spreadArrays(a);
var a2 = __spreadArrays([1], a);
var a3 = __spreadArrays([1, 2], a);
var a4 = __spreadArrays(a, [1]);
var a5 = __spreadArrays(a, [1, 2]);
var a6 = __spreadArrays([1, 2], a, [1, 2]);
var a7 = __spreadArrays([1], a, [2], a);
var a8 = __spreadArrays(a, a, a);
var a1 = __spreadArray([], a);
var a2 = __spreadArray([1], a);
var a3 = __spreadArray([1, 2], a);
var a4 = __spreadArray(__spreadArray([], a), [1]);
var a5 = __spreadArray(__spreadArray([], a), [1, 2]);
var a6 = __spreadArray(__spreadArray([1, 2], a), [1, 2]);
var a7 = __spreadArray(__spreadArray(__spreadArray([1], a), [2]), a);
var a8 = __spreadArray(__spreadArray(__spreadArray([], a), a), a);
}
function f1() {
var a = [1, 2, 3];
var b = __spreadArrays(["hello"], a, [true]);
var b = __spreadArray(__spreadArray(["hello"], a), [true]);
var b;
}
function f2() {
@@ -40,27 +40,28 @@ var __read = (this && this.__read) || function (o, n) {
}
return ar;
};
var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
function f0() {
var a = [1, 2, 3];
var a1 = __spread(a);
var a2 = __spread([1], a);
var a3 = __spread([1, 2], a);
var a4 = __spread(a, [1]);
var a5 = __spread(a, [1, 2]);
var a6 = __spread([1, 2], a, [1, 2]);
var a7 = __spread([1], a, [2], a);
var a8 = __spread(a, a, a);
var a1 = __spreadArray([], __read(a));
var a2 = __spreadArray([1], __read(a));
var a3 = __spreadArray([1, 2], __read(a));
var a4 = __spreadArray(__spreadArray([], __read(a)), [1]);
var a5 = __spreadArray(__spreadArray([], __read(a)), [1, 2]);
var a6 = __spreadArray(__spreadArray([1, 2], __read(a)), [1, 2]);
var a7 = __spreadArray(__spreadArray(__spreadArray([1], __read(a)), [2]), __read(a));
var a8 = __spreadArray(__spreadArray(__spreadArray([], __read(a)), __read(a)), __read(a));
}
function f1() {
var a = [1, 2, 3];
var b = __spread(["hello"], a, [true]);
var b = __spreadArray(__spreadArray(["hello"], __read(a)), [true]);
var b;
}
function f2() {
var a = __spread([]);
var b = __spread([5]);
var a = [];
var b = [5];
}
+17 -19
View File
@@ -62,21 +62,19 @@ var d9 = [[...temp1], ...["hello"]];
// Elisionopt SpreadElement
// ElementList, Elisionopt AssignmentExpression
// ElementList, Elisionopt SpreadElement
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
// SpreadElement:
// ... AssignmentExpression
var a0 = [, , 2, 3, 4];
var a1 = ["hello", "world"];
var a2 = __spreadArrays([, , ], a0, ["hello"]);
var a3 = __spreadArrays([, ], a0);
var a2 = __spreadArray(__spreadArray([, , ], a0), ["hello"]);
var a3 = __spreadArray([, ], a0);
var a4 = [function () { return 1; },];
var a5 = __spreadArrays(a0, [,]);
var a5 = __spreadArray(__spreadArray([], a0), [,]);
// Each element expression in a non-empty array literal is processed as follows:
// - If the array literal contains no spread elements, and if the array literal is contextually typed (section 4.19)
// by a type T and T has a property with the numeric name N, where N is the index of the element expression in the array literal,
@@ -99,13 +97,13 @@ var temp1 = [1, 2, 3];
var temp2 = [[1, 2, 3], ["hello", "string"]];
var temp3 = [undefined, null, undefined];
var temp4 = [];
var d0 = __spreadArrays([1, true], temp); // has type (string|number|boolean)[]
var d1 = __spreadArrays(temp); // has type string[]
var d2 = __spreadArrays(temp1);
var d3 = __spreadArrays(temp1);
var d4 = __spreadArrays(temp, temp1);
var d5 = __spreadArrays(temp3);
var d6 = __spreadArrays(temp4);
var d7 = __spreadArrays(temp1);
var d8 = [__spreadArrays(temp1)];
var d9 = __spreadArrays([__spreadArrays(temp1)], ["hello"]);
var d0 = __spreadArray([1, true], temp); // has type (string|number|boolean)[]
var d1 = __spreadArray([], temp); // has type string[]
var d2 = __spreadArray([], temp1);
var d3 = __spreadArray([], temp1);
var d4 = __spreadArray(__spreadArray([], temp), temp1);
var d5 = __spreadArray([], temp3);
var d6 = __spreadArray([], temp4);
var d7 = __spreadArray([], temp1);
var d8 = [__spreadArray([], temp1)];
var d9 = __spreadArray([__spreadArray([], temp1)], ["hello"]);
+7 -9
View File
@@ -40,12 +40,10 @@ var c2: myArray = [...temp1, ...temp]; // Error cannot assign (number
// - If the array literal contains no spread elements, and if the array literal is contextually typed (section 4.19)
// by a type T and T has a property with the numeric name N, where N is the index of the element expression in the array literal,
// the element expression is contextually typed by the type of that property.
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
// The resulting type an array literal expression is determined as follows:
// - If the array literal contains no spread elements and is contextually typed by a tuple-like type,
@@ -62,6 +60,6 @@ var _a = [1, 2, "string", true], b1 = _a[0], b2 = _a[1];
var temp = ["s", "t", "r"];
var temp1 = [1, 2, 3];
var temp2 = [[1, 2, 3], ["hello", "string"]];
var c0 = __spreadArrays(temp2); // Error
var c1 = __spreadArrays(temp1); // Error cannot assign number[] to [number, number, number]
var c2 = __spreadArrays(temp1, temp); // Error cannot assign (number|string)[] to number[]
var c0 = __spreadArray([], temp2); // Error
var c1 = __spreadArray([], temp1); // Error cannot assign number[] to [number, number, number]
var c2 = __spreadArray(__spreadArray([], temp1), temp); // Error cannot assign (number|string)[] to number[]
+13 -15
View File
@@ -43,38 +43,36 @@ o2?.b()!.toString!;
//// [callChain.js]
"use strict";
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
o1 === null || o1 === void 0 ? void 0 : o1();
o1 === null || o1 === void 0 ? void 0 : o1(1);
o1 === null || o1 === void 0 ? void 0 : o1.apply(void 0, [1, 2]);
o1 === null || o1 === void 0 ? void 0 : o1.apply(void 0, __spreadArrays([1], [2, 3], [4]));
o1 === null || o1 === void 0 ? void 0 : o1.apply(void 0, __spreadArray(__spreadArray([1], [2, 3]), [4]));
o2 === null || o2 === void 0 ? void 0 : o2.b();
o2 === null || o2 === void 0 ? void 0 : o2.b(1);
o2 === null || o2 === void 0 ? void 0 : o2.b.apply(o2, [1, 2]);
o2 === null || o2 === void 0 ? void 0 : o2.b.apply(o2, __spreadArrays([1], [2, 3], [4]));
o2 === null || o2 === void 0 ? void 0 : o2.b.apply(o2, __spreadArray(__spreadArray([1], [2, 3]), [4]));
o2 === null || o2 === void 0 ? void 0 : o2["b"]();
o2 === null || o2 === void 0 ? void 0 : o2["b"](1);
o2 === null || o2 === void 0 ? void 0 : o2["b"].apply(o2, [1, 2]);
o2 === null || o2 === void 0 ? void 0 : o2["b"].apply(o2, __spreadArrays([1], [2, 3], [4]));
o2 === null || o2 === void 0 ? void 0 : o2["b"].apply(o2, __spreadArray(__spreadArray([1], [2, 3]), [4]));
(_a = o3.b) === null || _a === void 0 ? void 0 : _a.call(o3).c;
(_b = o3.b) === null || _b === void 0 ? void 0 : _b.call(o3, 1).c;
(_c = o3.b) === null || _c === void 0 ? void 0 : _c.call.apply(_c, __spreadArrays([o3], [1, 2])).c;
(_d = o3.b) === null || _d === void 0 ? void 0 : _d.call.apply(_d, __spreadArrays([o3, 1], [2, 3], [4])).c;
(_c = o3.b) === null || _c === void 0 ? void 0 : _c.call.apply(_c, __spreadArray([o3], [1, 2])).c;
(_d = o3.b) === null || _d === void 0 ? void 0 : _d.call.apply(_d, __spreadArray(__spreadArray([o3, 1], [2, 3]), [4])).c;
(_e = o3.b) === null || _e === void 0 ? void 0 : _e.call(o3)["c"];
(_f = o3.b) === null || _f === void 0 ? void 0 : _f.call(o3, 1)["c"];
(_g = o3.b) === null || _g === void 0 ? void 0 : _g.call.apply(_g, __spreadArrays([o3], [1, 2]))["c"];
(_h = o3.b) === null || _h === void 0 ? void 0 : _h.call.apply(_h, __spreadArrays([o3, 1], [2, 3], [4]))["c"];
(_g = o3.b) === null || _g === void 0 ? void 0 : _g.call.apply(_g, __spreadArray([o3], [1, 2]))["c"];
(_h = o3.b) === null || _h === void 0 ? void 0 : _h.call.apply(_h, __spreadArray(__spreadArray([o3, 1], [2, 3]), [4]))["c"];
(_j = o3["b"]) === null || _j === void 0 ? void 0 : _j.call(o3).c;
(_k = o3["b"]) === null || _k === void 0 ? void 0 : _k.call(o3, 1).c;
(_l = o3["b"]) === null || _l === void 0 ? void 0 : _l.call.apply(_l, __spreadArrays([o3], [1, 2])).c;
(_m = o3["b"]) === null || _m === void 0 ? void 0 : _m.call.apply(_m, __spreadArrays([o3, 1], [2, 3], [4])).c;
(_l = o3["b"]) === null || _l === void 0 ? void 0 : _l.call.apply(_l, __spreadArray([o3], [1, 2])).c;
(_m = o3["b"]) === null || _m === void 0 ? void 0 : _m.call.apply(_m, __spreadArray(__spreadArray([o3, 1], [2, 3]), [4])).c;
var v = o4 === null || o4 === void 0 ? void 0 : o4(incr);
(_o = o5()) === null || _o === void 0 ? void 0 : _o();
// GH#36031
+5 -7
View File
@@ -12,17 +12,15 @@ withRest();
withRest(...n);
//// [callOverload.js]
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
var n;
fn(1); // no error
fn(1, 2, 3, 4);
takeTwo(1, 2, 3, 4);
withRest.apply(void 0, __spreadArrays(['a'], n)); // no error
withRest.apply(void 0, __spreadArray(['a'], n)); // no error
withRest();
withRest.apply(void 0, n);
+21 -23
View File
@@ -74,12 +74,10 @@ var __extends = (this && this.__extends) || (function () {
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
var _a, _b, _c, _d, _e, _f, _g;
function foo(x, y) {
@@ -93,23 +91,23 @@ var z;
var obj;
var xa;
foo(1, 2, "abc");
foo.apply(void 0, __spreadArrays([1, 2], a));
foo.apply(void 0, __spreadArrays([1, 2], a, ["abc"]));
foo.apply(void 0, __spreadArray([1, 2], a));
foo.apply(void 0, __spreadArray(__spreadArray([1, 2], a), ["abc"]));
obj.foo(1, 2, "abc");
obj.foo.apply(obj, __spreadArrays([1, 2], a));
obj.foo.apply(obj, __spreadArrays([1, 2], a, ["abc"]));
obj.foo.apply(obj, __spreadArrays([1, 2], a)).foo(1, 2, "abc");
(_a = obj.foo.apply(obj, __spreadArrays([1, 2], a))).foo.apply(_a, __spreadArrays([1, 2], a));
(_b = obj.foo.apply(obj, __spreadArrays([1, 2], a))).foo.apply(_b, __spreadArrays([1, 2], a, ["abc"]));
obj.foo.apply(obj, __spreadArray([1, 2], a));
obj.foo.apply(obj, __spreadArray(__spreadArray([1, 2], a), ["abc"]));
obj.foo.apply(obj, __spreadArray([1, 2], a)).foo(1, 2, "abc");
(_a = obj.foo.apply(obj, __spreadArray([1, 2], a))).foo.apply(_a, __spreadArray([1, 2], a));
(_b = obj.foo.apply(obj, __spreadArray([1, 2], a))).foo.apply(_b, __spreadArray(__spreadArray([1, 2], a), ["abc"]));
(obj.foo)(1, 2, "abc");
obj.foo.apply(obj, __spreadArrays([1, 2], a));
obj.foo.apply(obj, __spreadArrays([1, 2], a, ["abc"]));
(obj.foo.apply(obj, __spreadArrays([1, 2], a)).foo)(1, 2, "abc");
(_c = obj.foo.apply(obj, __spreadArrays([1, 2], a))).foo.apply(_c, __spreadArrays([1, 2], a));
(_d = obj.foo.apply(obj, __spreadArrays([1, 2], a))).foo.apply(_d, __spreadArrays([1, 2], a, ["abc"]));
obj.foo.apply(obj, __spreadArray([1, 2], a));
obj.foo.apply(obj, __spreadArray(__spreadArray([1, 2], a), ["abc"]));
(obj.foo.apply(obj, __spreadArray([1, 2], a)).foo)(1, 2, "abc");
(_c = obj.foo.apply(obj, __spreadArray([1, 2], a))).foo.apply(_c, __spreadArray([1, 2], a));
(_d = obj.foo.apply(obj, __spreadArray([1, 2], a))).foo.apply(_d, __spreadArray(__spreadArray([1, 2], a), ["abc"]));
xa[1].foo(1, 2, "abc");
(_e = xa[1]).foo.apply(_e, __spreadArrays([1, 2], a));
(_f = xa[1]).foo.apply(_f, __spreadArrays([1, 2], a, ["abc"]));
(_e = xa[1]).foo.apply(_e, __spreadArray([1, 2], a));
(_f = xa[1]).foo.apply(_f, __spreadArray(__spreadArray([1, 2], a), ["abc"]));
(_g = xa[1]).foo.apply(_g, [1, 2, "abc"]);
var C = /** @class */ (function () {
function C(x, y) {
@@ -118,7 +116,7 @@ var C = /** @class */ (function () {
z[_i - 2] = arguments[_i];
}
this.foo(x, y);
this.foo.apply(this, __spreadArrays([x, y], z));
this.foo.apply(this, __spreadArray([x, y], z));
}
C.prototype.foo = function (x, y) {
var z = [];
@@ -132,12 +130,12 @@ var D = /** @class */ (function (_super) {
__extends(D, _super);
function D() {
var _this = _super.call(this, 1, 2) || this;
_this = _super.apply(this, __spreadArrays([1, 2], a)) || this;
_this = _super.apply(this, __spreadArray([1, 2], a)) || this;
return _this;
}
D.prototype.foo = function () {
_super.prototype.foo.call(this, 1, 2);
_super.prototype.foo.apply(this, __spreadArrays([1, 2], a));
_super.prototype.foo.apply(this, __spreadArray([1, 2], a));
};
return D;
}(C));
+12 -14
View File
@@ -38,31 +38,29 @@ prefix2("g", ...ns);
//// [callWithSpread2.js]
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
// good
all.apply(void 0, ns);
weird.apply(void 0, ns);
weird.apply(void 0, mixed);
weird.apply(void 0, tuple);
prefix.apply(void 0, __spreadArrays(["a"], ns));
rest.apply(void 0, __spreadArrays(["d"], ns));
prefix.apply(void 0, __spreadArray(["a"], ns));
rest.apply(void 0, __spreadArray(["d"], ns));
// extra arguments
normal.apply(void 0, __spreadArrays(["g"], ns));
normal.apply(void 0, __spreadArray(["g"], ns));
thunk.apply(void 0, ns);
// bad
all.apply(void 0, mixed);
all.apply(void 0, tuple);
prefix.apply(void 0, __spreadArrays(["b"], mixed));
prefix.apply(void 0, __spreadArrays(["c"], tuple));
rest.apply(void 0, __spreadArrays(["e"], mixed));
rest.apply(void 0, __spreadArrays(["f"], tuple));
prefix.apply(void 0, __spreadArray(["b"], mixed));
prefix.apply(void 0, __spreadArray(["c"], tuple));
rest.apply(void 0, __spreadArray(["e"], mixed));
rest.apply(void 0, __spreadArray(["f"], tuple));
prefix.apply(void 0, ns); // required parameters are required
prefix.apply(void 0, mixed);
prefix.apply(void 0, tuple);
prefix2.apply(void 0, __spreadArrays(["g"], ns));
prefix2.apply(void 0, __spreadArray(["g"], ns));
+15 -17
View File
@@ -37,32 +37,30 @@ fs5(...s2, "foo", ...s2);
//// [callWithSpread3.js]
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
// error
fs2.apply(void 0, __spreadArrays(['a'], s2)); // error on ...s2
fs2.apply(void 0, __spreadArrays(['a', 'b', 'c'], s2)); // error on 'c' and ...s2
fs2.apply(void 0, __spreadArrays(['a', 'b'], s2, ['c'])); // error on ...s2 and 'c'
fs2.apply(void 0, __spreadArrays(['a', 'b', 'c'], s2, ['d'])); // error on 'c', ...s2 and 'd'
fs2.apply(void 0, __spreadArrays(s2, ['a'])); // error on 'a'
fs2.apply(void 0, __spreadArray(['a'], s2)); // error on ...s2
fs2.apply(void 0, __spreadArray(['a', 'b', 'c'], s2)); // error on 'c' and ...s2
fs2.apply(void 0, __spreadArray(__spreadArray(['a', 'b'], s2), ['c'])); // error on ...s2 and 'c'
fs2.apply(void 0, __spreadArray(__spreadArray(['a', 'b', 'c'], s2), ['d'])); // error on 'c', ...s2 and 'd'
fs2.apply(void 0, __spreadArray(__spreadArray([], s2), ['a'])); // error on 'a'
fs2.apply(void 0, s3); // error on ...s3
fs2_.apply(void 0, s_); // error on ...s_
fs2_.apply(void 0, s2n_); // error on ...s2n_
fs2_.apply(void 0, __spreadArrays(s_, s_)); // error FIXME: bad error message
fs2_.apply(void 0, __spreadArrays(s_, s_, s_)); // error FIXME: worse error message
fs2_.apply(void 0, __spreadArray(__spreadArray([], s_), s_)); // error FIXME: bad error message
fs2_.apply(void 0, __spreadArray(__spreadArray(__spreadArray([], s_), s_), s_)); // error FIXME: worse error message
// fs2n_(...s2, ...s_); // FIXME: should be a type error
fs2n_.apply(void 0, s2_); // error on ...s2_
// ok
fs2_.apply(void 0, s2_);
fs2_.apply(void 0, __spreadArrays(s2_, s_));
fs2_.apply(void 0, __spreadArrays(s2_, s2_));
fs2_.apply(void 0, __spreadArrays(s_, s2_));
fs2_.apply(void 0, __spreadArray(__spreadArray([], s2_), s_));
fs2_.apply(void 0, __spreadArray(__spreadArray([], s2_), s2_));
fs2_.apply(void 0, __spreadArray(__spreadArray([], s_), s2_));
fs2n_.apply(void 0, s2n_);
fs2n_.apply(void 0, s2);
// fs2n_(...s2, ...n_); // FIXME: should compile
fs5.apply(void 0, __spreadArrays(s2, ["foo"], s2));
fs5.apply(void 0, __spreadArray(__spreadArray(__spreadArray([], s2), ["foo"]), s2));
@@ -70,12 +70,10 @@ var [c14, c15, c16] = [1, 2, "string"];
* AssignmentRestElement:
* ... LeftHandSideExpression
*/
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
// In a destructuring assignment expression, the type of the expression on the right must be assignable to the assignment target on the left.
// An expression of type S is considered assignable to an assignment target V if one of the following is true
@@ -95,7 +93,7 @@ var _e = foo(), b6 = _e[0], b7 = _e[1];
var b8 = foo().slice(0);
// S is not a tuple- like type and the numeric index signature type of S is assignable to the target given in E.
var temp = [1, 2, 3];
var _f = __spreadArrays(temp), c0 = _f[0], c1 = _f[1];
var _f = __spreadArray([], temp), c0 = _f[0], c1 = _f[1];
var c2 = [][0];
var _g = [[[]], [[[[]]]]], c3 = _g[0][0][0], c4 = _g[1][0][0][0][0];
var _h = [[1], true], c5 = _h[0][0], c6 = _h[1];
@@ -86,9 +86,10 @@ var __read = (this && this.__read) || function (o, n) {
}
return ar;
};
var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
// In a destructuring assignment expression, the type of the expression on the right must be assignable to the assignment target on the left.
// An expression of type S is considered assignable to an assignment target V if one of the following is true
@@ -108,7 +109,7 @@ var _g = __read(foo(), 2), b6 = _g[0], b7 = _g[1];
var _h = __read(foo()), b8 = _h.slice(0);
// S is not a tuple- like type and the numeric index signature type of S is assignable to the target given in E.
var temp = [1, 2, 3];
var _j = __read(__spread(temp), 2), c0 = _j[0], c1 = _j[1];
var _j = __read(__spreadArray([], __read(temp)), 2), c0 = _j[0], c1 = _j[1];
var _k = __read([], 1), c2 = _k[0];
var _l = __read([[[]], [[[[]]]]], 2), _m = __read(_l[0], 1), _o = __read(_m[0], 1), c3 = _o[0], _p = __read(_l[1], 1), _q = __read(_p[0], 1), _r = __read(_q[0], 1), _s = __read(_r[0], 1), c4 = _s[0];
var _t = __read([[1], true], 2), _u = __read(_t[0], 1), c5 = _u[0], c6 = _t[1];
@@ -35,12 +35,10 @@ function foo(idx: number): F {
var [c4, c5, c6] = foo(1); // Error
//// [destructuringArrayBindingPatternAndAssignment2.js]
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
// V is an array assignment pattern, S is the type Any or an array-like type (section 3.3.2), and, for each assignment element E in V,
// S is the type Any, or
@@ -57,8 +55,8 @@ var _c = bar(), _d = _c[0], b3 = _d === void 0 ? "string" : _d, b4 = _c[1], b5 =
// V is an array assignment pattern, S is the type Any or an array-like type (section 3.3.2), and, for each assignment element E in V,
// S is not a tuple- like type and the numeric index signature type of S is assignable to the target given in E.
var temp = [1, 2, 3];
var _e = __spreadArrays(temp), c0 = _e[0], c1 = _e[1]; // Error
var _f = __spreadArrays(temp), c2 = _f[0], c3 = _f[1]; // Error
var _e = __spreadArray([], temp), c0 = _e[0], c1 = _e[1]; // Error
var _f = __spreadArray([], temp), c2 = _f[0], c3 = _f[1]; // Error
function foo(idx) {
return {
2: true
@@ -64,9 +64,10 @@ var __read = (this && this.__read) || function (o, n) {
}
return ar;
};
var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
function a1() {
var x = [];
@@ -109,8 +110,8 @@ function a11(_a) {
}
var array = [1, 2, 3];
var array2 = [true, false, "hello"];
a2(__spread(array));
a1.apply(void 0, __spread(array));
a2(__spreadArray([], __read(array)));
a1.apply(void 0, __spreadArray([], __read(array)));
a9([1, 2, [["string"]], false, true]); // Parameter type is [any, any, [[any]]]
a10([1, 2, [["string"]], false, true]); // Parameter type is any[]
a10([1, 2, 3, false, true]); // Parameter type is any[]
@@ -42,12 +42,10 @@ var {h: {h1 = [undefined, null]}}: { h: { h1: number[] } } = { h: { h1: [1, 2] }
//// [destructuringVariableDeclaration1ES5.js]
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
// The type T associated with a destructuring variable declaration is determined as follows:
// If the declaration includes a type annotation, T is that type.
@@ -73,7 +71,7 @@ var _o = [1, "string"], d1 = _o[0], d2 = _o[1];
// Otherwise, if S is a tuple- like type (section 3.3.3):
// Otherwise, if S has a numeric index signature, T is the type of the numeric index signature.
var temp1 = [true, false, true];
var _p = __spreadArrays([1, "string"], temp1), d3 = _p[0], d4 = _p[1];
var _p = __spreadArray([1, "string"], temp1), d3 = _p[0], d4 = _p[1];
// Combining both forms of destructuring,
var _q = { e: [1, 2, { b1: 4, b4: 0 }] }.e, e1 = _q[0], e2 = _q[1], _r = _q[2], e3 = _r === void 0 ? { b1: 1000, b4: 200 } : _r;
var _s = { f: [1, 2, { f3: 4, f5: 0 }] }.f, f1 = _s[0], f2 = _s[1], _t = _s[2], f4 = _t.f3, f5 = _t.f5;
@@ -58,9 +58,10 @@ var __read = (this && this.__read) || function (o, n) {
}
return ar;
};
var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
// The type T associated with a destructuring variable declaration is determined as follows:
// If the declaration includes a type annotation, T is that type.
@@ -86,7 +87,7 @@ var _s = __read([1, "string"], 2), d1 = _s[0], d2 = _s[1];
// Otherwise, if S is a tuple- like type (section 3.3.3):
// Otherwise, if S has a numeric index signature, T is the type of the numeric index signature.
var temp1 = [true, false, true];
var _t = __read(__spread([1, "string"], temp1), 2), d3 = _t[0], d4 = _t[1];
var _t = __read(__spreadArray([1, "string"], __read(temp1)), 2), d3 = _t[0], d4 = _t[1];
// Combining both forms of destructuring,
var _u = __read({ e: [1, 2, { b1: 4, b4: 0 }] }.e, 3), e1 = _u[0], e2 = _u[1], _v = _u[2], e3 = _v === void 0 ? { b1: 1000, b4: 200 } : _v;
var _w = __read({ f: [1, 2, { f3: 4, f5: 0 }] }.f, 4), f1 = _w[0], f2 = _w[1], _x = _w[2], f4 = _x.f3, f5 = _x.f5;
@@ -63,11 +63,14 @@ function arrayLiteral1() {
}
function arrayLiteral2() {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, y];
var _a;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
_a = [[]];
return [4 /*yield*/, y];
case 1:
x = __spreadArrays.apply(void 0, [(_a.sent()), [z]]);
x = __spreadArray.apply(void 0, [__spreadArray.apply(void 0, _a.concat([(_b.sent())])), [z]]);
return [2 /*return*/];
}
});
@@ -79,10 +82,10 @@ function arrayLiteral3() {
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
_a = [y];
_a = [__spreadArray([], y)];
return [4 /*yield*/, z];
case 1:
x = __spreadArrays.apply(void 0, _a.concat([[_b.sent()]]));
x = __spreadArray.apply(void 0, _a.concat([[_b.sent()]]));
return [2 /*return*/];
}
});
@@ -94,7 +97,7 @@ function arrayLiteral4() {
switch (_a.label) {
case 0: return [4 /*yield*/, y];
case 1:
x = __spreadArrays.apply(void 0, [[_a.sent()], z]);
x = __spreadArray.apply(void 0, [[_a.sent()], z]);
return [2 /*return*/];
}
});
@@ -109,7 +112,7 @@ function arrayLiteral5() {
_a = [[y]];
return [4 /*yield*/, z];
case 1:
x = __spreadArrays.apply(void 0, _a.concat([(_b.sent())]));
x = __spreadArray.apply(void 0, _a.concat([(_b.sent())]));
return [2 /*return*/];
}
});
@@ -146,7 +146,7 @@ function callExpression4() {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, x.apply(void 0, __spreadArrays(y, [z]))];
case 0: return [4 /*yield*/, x.apply(void 0, __spreadArray(__spreadArray([], y), [z]))];
case 1:
_a.sent();
return [2 /*return*/];
@@ -160,7 +160,7 @@ function callExpression5() {
switch (_a.label) {
case 0: return [4 /*yield*/, x];
case 1:
(_a.sent()).apply(void 0, __spreadArrays(y, [z]));
(_a.sent()).apply(void 0, __spreadArray(__spreadArray([], y), [z]));
return [2 /*return*/];
}
});
@@ -168,15 +168,16 @@ function callExpression5() {
}
function callExpression6() {
return __awaiter(this, void 0, void 0, function () {
var _a, _b, _c;
return __generator(this, function (_d) {
switch (_d.label) {
var _a, _b, _c, _d;
return __generator(this, function (_e) {
switch (_e.label) {
case 0:
_b = (_a = x).apply;
_c = [void 0];
_d = [[]];
return [4 /*yield*/, y];
case 1:
_b.apply(_a, _c.concat([__spreadArrays.apply(void 0, [(_d.sent()), [z]])]));
_b.apply(_a, _c.concat([__spreadArray.apply(void 0, [__spreadArray.apply(void 0, _d.concat([(_e.sent())])), [z]])]));
return [2 /*return*/];
}
});
@@ -190,10 +191,10 @@ function callExpression7() {
case 0:
_b = (_a = x).apply;
_c = [void 0];
_d = [y];
_d = [__spreadArray([], y)];
return [4 /*yield*/, z];
case 1:
_b.apply(_a, _c.concat([__spreadArrays.apply(void 0, _d.concat([[_e.sent()]]))]));
_b.apply(_a, _c.concat([__spreadArray.apply(void 0, _d.concat([[_e.sent()]]))]));
return [2 /*return*/];
}
});
@@ -209,7 +210,7 @@ function callExpression8() {
_c = [void 0];
return [4 /*yield*/, y];
case 1:
_b.apply(_a, _c.concat([__spreadArrays.apply(void 0, [[_d.sent()], z])]));
_b.apply(_a, _c.concat([__spreadArray.apply(void 0, [[_d.sent()], z])]));
return [2 /*return*/];
}
});
@@ -226,7 +227,7 @@ function callExpression9() {
_d = [[y]];
return [4 /*yield*/, z];
case 1:
_b.apply(_a, _c.concat([__spreadArrays.apply(void 0, _d.concat([(_e.sent())]))]));
_b.apply(_a, _c.concat([__spreadArray.apply(void 0, _d.concat([(_e.sent())]))]));
return [2 /*return*/];
}
});
@@ -145,7 +145,7 @@ function newExpression4() {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, new (x.bind.apply(x, __spreadArrays([void 0], y, [z])))()];
case 0: return [4 /*yield*/, new (x.bind.apply(x, __spreadArray(__spreadArray([void 0], y), [z])))()];
case 1:
_a.sent();
return [2 /*return*/];
@@ -160,7 +160,7 @@ function newExpression5() {
switch (_b.label) {
case 0: return [4 /*yield*/, x];
case 1:
new ((_a = (_b.sent())).bind.apply(_a, __spreadArrays([void 0], y, [z])))();
new ((_a = (_b.sent())).bind.apply(_a, __spreadArray(__spreadArray([void 0], y), [z])))();
return [2 /*return*/];
}
});
@@ -177,7 +177,7 @@ function newExpression6() {
_d = [[void 0]];
return [4 /*yield*/, y];
case 1:
new (_b.apply(_a, _c.concat([__spreadArrays.apply(void 0, _d.concat([(_e.sent()), [z]]))])))();
new (_b.apply(_a, _c.concat([__spreadArray.apply(void 0, [__spreadArray.apply(void 0, _d.concat([(_e.sent())])), [z]])])))();
return [2 /*return*/];
}
});
@@ -191,10 +191,10 @@ function newExpression7() {
case 0:
_b = (_a = x.bind).apply;
_c = [x];
_d = [[void 0], y];
_d = [__spreadArray([void 0], y)];
return [4 /*yield*/, z];
case 1:
new (_b.apply(_a, _c.concat([__spreadArrays.apply(void 0, _d.concat([[_e.sent()]]))])))();
new (_b.apply(_a, _c.concat([__spreadArray.apply(void 0, _d.concat([[_e.sent()]]))])))();
return [2 /*return*/];
}
});
@@ -211,7 +211,7 @@ function newExpression8() {
_d = [void 0];
return [4 /*yield*/, y];
case 1:
new (_b.apply(_a, _c.concat([__spreadArrays.apply(void 0, [_d.concat([_e.sent()]), z])])))();
new (_b.apply(_a, _c.concat([__spreadArray.apply(void 0, [_d.concat([_e.sent()]), z])])))();
return [2 /*return*/];
}
});
@@ -228,7 +228,7 @@ function newExpression9() {
_d = [[void 0, y]];
return [4 /*yield*/, z];
case 1:
new (_b.apply(_a, _c.concat([__spreadArrays.apply(void 0, _d.concat([(_e.sent())]))])))();
new (_b.apply(_a, _c.concat([__spreadArray.apply(void 0, _d.concat([(_e.sent())]))])))();
return [2 /*return*/];
}
});
@@ -167,60 +167,58 @@ ff1 = ff4; // Error
//// [genericRestParameters1.js]
"use strict";
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
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.apply(void 0, __spreadArray([42], t2));
f1.apply(void 0, __spreadArray([42, "hello"], t1));
f1.apply(void 0, __spreadArray([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
f1.apply(void 0, __spreadArray(__spreadArray([], 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.apply(void 0, __spreadArray([42], t2));
f2.apply(void 0, __spreadArray([42, "hello"], t1));
f2.apply(void 0, __spreadArray([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
f2.apply(void 0, __spreadArray(__spreadArray([], 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)[]
var x15 = f10.apply(void 0, __spreadArray([42], t2)); // [number, string, boolean]
var x16 = f10.apply(void 0, __spreadArray([42, "hello"], t1)); // [number, string, boolean]
var x17 = f10.apply(void 0, __spreadArray([42, "hello", true], t0)); // [number, string, boolean]
var x18 = f10.apply(void 0, __spreadArray(__spreadArray([], 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 x3 = f10.apply(void 0, __spreadArray([1], u)); // [number, ...string[]]
var x4 = f10.apply(void 0, __spreadArray(__spreadArray([], 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)[]
var z15 = f11.apply(void 0, __spreadArray([42], t2)); // [42, string, boolean]
var z16 = f11.apply(void 0, __spreadArray([42, "hello"], t1)); // [42, "hello", boolean]
var z17 = f11.apply(void 0, __spreadArray([42, "hello", true], t0)); // [42, "hello", true]
var z18 = f11.apply(void 0, __spreadArray(__spreadArray([], 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)[]
var x3 = f11.apply(void 0, __spreadArray([1], u)); // [1, ...string[]]
var x4 = f11.apply(void 0, __spreadArray(__spreadArray([], u), v)); // (string | number)[]
}
function call(f) {
var args = [];
@@ -246,7 +244,7 @@ function bind(f, x) {
for (var _i = 0; _i < arguments.length; _i++) {
rest[_i] = arguments[_i];
}
return f.apply(void 0, __spreadArrays([x], rest));
return f.apply(void 0, __spreadArray([x], rest));
};
}
var f21 = bind(f20, 42); // (y: string, z: boolean) => string[]
@@ -81,53 +81,51 @@ type T12 = P1<(x: number, y: number) => void>;
//// [genericRestParameters2.js]
"use strict";
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
f10(42, "hello");
f10(42, "hello", true);
f10(42, "hello", true, false);
f10(t1[0], t1[1], t1[2], t1[3]);
f10.apply(void 0, t1);
f10.apply(void 0, __spreadArrays([42], t2));
f10.apply(void 0, __spreadArrays([42, "hello"], t3));
f10.apply(void 0, __spreadArrays([42, "hello", true], t4));
f10.apply(void 0, __spreadArrays([42, "hello", true], t4, [false], t3));
f10.apply(void 0, __spreadArray([42], t2));
f10.apply(void 0, __spreadArray([42, "hello"], t3));
f10.apply(void 0, __spreadArray([42, "hello", true], t4));
f10.apply(void 0, __spreadArray(__spreadArray(__spreadArray([42, "hello", true], t4), [false]), t3));
f11(42, "hello");
f11(42, "hello", true);
f11(42, "hello", true, false);
f11(t1[0], t1[1], t1[2], t1[3]);
f11.apply(void 0, t1);
f11.apply(void 0, __spreadArrays([42], t2));
f11.apply(void 0, __spreadArrays([42, "hello"], t3));
f11.apply(void 0, __spreadArrays([42, "hello", true], t4));
f11.apply(void 0, __spreadArrays([42, "hello", true], t4, [false], t3));
f11.apply(void 0, __spreadArray([42], t2));
f11.apply(void 0, __spreadArray([42, "hello"], t3));
f11.apply(void 0, __spreadArray([42, "hello", true], t4));
f11.apply(void 0, __spreadArray(__spreadArray(__spreadArray([42, "hello", true], t4), [false]), t3));
f12(42, "hello");
f12(42, "hello", true);
f12(42, "hello", true, false);
f12(t1[0], t1[1], t1[2], t1[3]);
f12.apply(void 0, t1);
f12.apply(void 0, __spreadArrays([42], t2));
f12.apply(void 0, __spreadArrays([42, "hello"], t3));
f12.apply(void 0, __spreadArrays([42, "hello", true], t4));
f12.apply(void 0, __spreadArrays([42, "hello", true], t4, [false], t3));
f12.apply(void 0, __spreadArray([42], t2));
f12.apply(void 0, __spreadArray([42, "hello"], t3));
f12.apply(void 0, __spreadArray([42, "hello", true], t4));
f12.apply(void 0, __spreadArray(__spreadArray(__spreadArray([42, "hello", true], t4), [false]), t3));
f13(42, "hello");
f13(42, "hello", true);
f13(42, "hello", true, false);
f13(t1[0], t1[1], t1[2], t1[3]);
f13.apply(void 0, t1);
f13.apply(void 0, __spreadArrays([42], t2));
f13.apply(void 0, __spreadArrays([42, "hello"], t3));
f13.apply(void 0, __spreadArrays([42, "hello", true], t4));
f13.apply(void 0, __spreadArrays([42, "hello", true], t4, [false], t3));
f13.apply(void 0, __spreadArray([42], t2));
f13.apply(void 0, __spreadArray([42, "hello"], t3));
f13.apply(void 0, __spreadArray([42, "hello", true], t4));
f13.apply(void 0, __spreadArray(__spreadArray(__spreadArray([42, "hello", true], t4), [false]), t3));
f20.apply(void 0, t1);
f20.apply(void 0, __spreadArrays([42], t2));
f20.apply(void 0, __spreadArrays([42, "hello"], t3));
f20.apply(void 0, __spreadArrays([42, "hello"], t2, [true]));
f20.apply(void 0, __spreadArray([42], t2));
f20.apply(void 0, __spreadArray([42, "hello"], t3));
f20.apply(void 0, __spreadArray(__spreadArray([42, "hello"], t2), [true]));
//// [genericRestParameters2.d.ts]
@@ -68,19 +68,17 @@ foo2(...x2);
//// [genericRestParameters3.js]
"use strict";
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
f1("foo", "abc");
f1("foo", 10, true);
f1.apply(void 0, __spreadArrays(["foo"], t1));
f1.apply(void 0, __spreadArrays(["foo"], t2));
f1.apply(void 0, __spreadArrays(["foo"], t3));
f1.apply(void 0, __spreadArrays(["foo"], t4));
f1.apply(void 0, __spreadArray(["foo"], t1));
f1.apply(void 0, __spreadArray(["foo"], t2));
f1.apply(void 0, __spreadArray(["foo"], t3));
f1.apply(void 0, __spreadArray(["foo"], t4));
f1("foo", 10); // Error
f1("foo"); // Error
f2 = f1;
@@ -674,12 +674,10 @@ var __extends = (this && this.__extends) || (function () {
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
var Shape = /** @class */ (function () {
function Shape() {
@@ -960,7 +958,7 @@ function f1(thing) {
var x1 = path(thing, 'a'); // { x: number, y: string }
var x2 = path(thing, 'a', 'y'); // string
var x3 = path(thing, 'b'); // boolean
var x4 = path.apply(void 0, __spreadArrays([thing], ['a', 'x'])); // any
var x4 = path.apply(void 0, __spreadArray([thing], ['a', 'x'])); // any
}
// Repro from comment in #12114
var assignTo2 = function (object, key1, key2) {
@@ -62,12 +62,10 @@ function f5() {
}
//// [literalFreshnessPropagationOnNarrowing.js]
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
function f1() {
var b = true;
@@ -90,7 +88,7 @@ function f2() {
// Desired: OK
// 3.0: Error
// 3.1: OK
var a5 = __spreadArrays(Array.isArray(elOrA) ? elOrA : [elOrA]);
var a5 = __spreadArray([], Array.isArray(elOrA) ? elOrA : [elOrA]);
}
function f3() {
var x = 'x';
+30 -32
View File
@@ -97,12 +97,10 @@ new i["a-b"][1](1, 2, ...a);
new i["a-b"][1](1, 2, ...a, "string");
//// [newWithSpread.js]
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
function f(x, y) {
@@ -136,52 +134,52 @@ var h;
var i;
// Basic expression
new f(1, 2, "string");
new (f.bind.apply(f, __spreadArrays([void 0, 1, 2], a)))();
new (f.bind.apply(f, __spreadArrays([void 0, 1, 2], a, ["string"])))();
new (f.bind.apply(f, __spreadArray([void 0, 1, 2], a)))();
new (f.bind.apply(f, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))();
// Multiple spreads arguments
new (f2.bind.apply(f2, __spreadArrays([void 0], a, a)))();
new (f.bind.apply(f, __spreadArrays([void 0, 1, 2], a, a)))();
new (f2.bind.apply(f2, __spreadArray(__spreadArray([void 0], a), a)))();
new (f.bind.apply(f, __spreadArray(__spreadArray([void 0, 1, 2], a), a)))();
// Call expression
new f(1, 2, "string")();
new (f.bind.apply(f, __spreadArrays([void 0, 1, 2], a)))()();
new (f.bind.apply(f, __spreadArrays([void 0, 1, 2], a, ["string"])))()();
new (f.bind.apply(f, __spreadArray([void 0, 1, 2], a)))()();
new (f.bind.apply(f, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))()();
// Property access expression
new b.f(1, 2, "string");
new ((_a = b.f).bind.apply(_a, __spreadArrays([void 0, 1, 2], a)))();
new ((_b = b.f).bind.apply(_b, __spreadArrays([void 0, 1, 2], a, ["string"])))();
new ((_a = b.f).bind.apply(_a, __spreadArray([void 0, 1, 2], a)))();
new ((_b = b.f).bind.apply(_b, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))();
// Parenthesised expression
new (b.f)(1, 2, "string");
new ((_c = (b.f)).bind.apply(_c, __spreadArrays([void 0, 1, 2], a)))();
new ((_d = (b.f)).bind.apply(_d, __spreadArrays([void 0, 1, 2], a, ["string"])))();
new ((_c = (b.f)).bind.apply(_c, __spreadArray([void 0, 1, 2], a)))();
new ((_d = (b.f)).bind.apply(_d, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))();
// Element access expression
new d[1].f(1, 2, "string");
new ((_e = d[1].f).bind.apply(_e, __spreadArrays([void 0, 1, 2], a)))();
new ((_f = d[1].f).bind.apply(_f, __spreadArrays([void 0, 1, 2], a, ["string"])))();
new ((_e = d[1].f).bind.apply(_e, __spreadArray([void 0, 1, 2], a)))();
new ((_f = d[1].f).bind.apply(_f, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))();
// Element access expression with a punctuated key
new e["a-b"].f(1, 2, "string");
new ((_g = e["a-b"].f).bind.apply(_g, __spreadArrays([void 0, 1, 2], a)))();
new ((_h = e["a-b"].f).bind.apply(_h, __spreadArrays([void 0, 1, 2], a, ["string"])))();
new ((_g = e["a-b"].f).bind.apply(_g, __spreadArray([void 0, 1, 2], a)))();
new ((_h = e["a-b"].f).bind.apply(_h, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))();
// Basic expression
new B(1, 2, "string");
new (B.bind.apply(B, __spreadArrays([void 0, 1, 2], a)))();
new (B.bind.apply(B, __spreadArrays([void 0, 1, 2], a, ["string"])))();
new (B.bind.apply(B, __spreadArray([void 0, 1, 2], a)))();
new (B.bind.apply(B, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))();
// Property access expression
new c["a-b"](1, 2, "string");
new ((_j = c["a-b"]).bind.apply(_j, __spreadArrays([void 0, 1, 2], a)))();
new ((_k = c["a-b"]).bind.apply(_k, __spreadArrays([void 0, 1, 2], a, ["string"])))();
new ((_j = c["a-b"]).bind.apply(_j, __spreadArray([void 0, 1, 2], a)))();
new ((_k = c["a-b"]).bind.apply(_k, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))();
// Parenthesised expression
new (c["a-b"])(1, 2, "string");
new ((_l = (c["a-b"])).bind.apply(_l, __spreadArrays([void 0, 1, 2], a)))();
new ((_m = (c["a-b"])).bind.apply(_m, __spreadArrays([void 0, 1, 2], a, ["string"])))();
new ((_l = (c["a-b"])).bind.apply(_l, __spreadArray([void 0, 1, 2], a)))();
new ((_m = (c["a-b"])).bind.apply(_m, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))();
// Element access expression
new g[1]["a-b"](1, 2, "string");
new ((_o = g[1]["a-b"]).bind.apply(_o, __spreadArrays([void 0, 1, 2], a)))();
new ((_p = g[1]["a-b"]).bind.apply(_p, __spreadArrays([void 0, 1, 2], a, ["string"])))();
new ((_o = g[1]["a-b"]).bind.apply(_o, __spreadArray([void 0, 1, 2], a)))();
new ((_p = g[1]["a-b"]).bind.apply(_p, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))();
// Element access expression with a punctuated key
new h["a-b"]["a-b"](1, 2, "string");
new ((_q = h["a-b"]["a-b"]).bind.apply(_q, __spreadArrays([void 0, 1, 2], a)))();
new ((_r = h["a-b"]["a-b"]).bind.apply(_r, __spreadArrays([void 0, 1, 2], a, ["string"])))();
new ((_q = h["a-b"]["a-b"]).bind.apply(_q, __spreadArray([void 0, 1, 2], a)))();
new ((_r = h["a-b"]["a-b"]).bind.apply(_r, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))();
// Element access expression with a number
new i["a-b"][1](1, 2, "string");
new ((_s = i["a-b"][1]).bind.apply(_s, __spreadArrays([void 0, 1, 2], a)))();
new ((_t = i["a-b"][1]).bind.apply(_t, __spreadArrays([void 0, 1, 2], a, ["string"])))();
new ((_s = i["a-b"][1]).bind.apply(_s, __spreadArray([void 0, 1, 2], a)))();
new ((_t = i["a-b"][1]).bind.apply(_t, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))();
+30 -32
View File
@@ -96,12 +96,10 @@ new i["a-b"][1](1, 2, ...a);
new i["a-b"][1](1, 2, ...a, "string");
//// [newWithSpreadES5.js]
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
function f(x, y) {
@@ -135,52 +133,52 @@ var h;
var i;
// Basic expression
new f(1, 2, "string");
new (f.bind.apply(f, __spreadArrays([void 0, 1, 2], a)))();
new (f.bind.apply(f, __spreadArrays([void 0, 1, 2], a, ["string"])))();
new (f.bind.apply(f, __spreadArray([void 0, 1, 2], a)))();
new (f.bind.apply(f, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))();
// Multiple spreads arguments
new (f2.bind.apply(f2, __spreadArrays([void 0], a, a)))();
new (f.bind.apply(f, __spreadArrays([void 0, 1, 2], a, a)))();
new (f2.bind.apply(f2, __spreadArray(__spreadArray([void 0], a), a)))();
new (f.bind.apply(f, __spreadArray(__spreadArray([void 0, 1, 2], a), a)))();
// Call expression
new f(1, 2, "string")();
new (f.bind.apply(f, __spreadArrays([void 0, 1, 2], a)))()();
new (f.bind.apply(f, __spreadArrays([void 0, 1, 2], a, ["string"])))()();
new (f.bind.apply(f, __spreadArray([void 0, 1, 2], a)))()();
new (f.bind.apply(f, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))()();
// Property access expression
new b.f(1, 2, "string");
new ((_a = b.f).bind.apply(_a, __spreadArrays([void 0, 1, 2], a)))();
new ((_b = b.f).bind.apply(_b, __spreadArrays([void 0, 1, 2], a, ["string"])))();
new ((_a = b.f).bind.apply(_a, __spreadArray([void 0, 1, 2], a)))();
new ((_b = b.f).bind.apply(_b, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))();
// Parenthesised expression
new (b.f)(1, 2, "string");
new ((_c = (b.f)).bind.apply(_c, __spreadArrays([void 0, 1, 2], a)))();
new ((_d = (b.f)).bind.apply(_d, __spreadArrays([void 0, 1, 2], a, ["string"])))();
new ((_c = (b.f)).bind.apply(_c, __spreadArray([void 0, 1, 2], a)))();
new ((_d = (b.f)).bind.apply(_d, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))();
// Element access expression
new d[1].f(1, 2, "string");
new ((_e = d[1].f).bind.apply(_e, __spreadArrays([void 0, 1, 2], a)))();
new ((_f = d[1].f).bind.apply(_f, __spreadArrays([void 0, 1, 2], a, ["string"])))();
new ((_e = d[1].f).bind.apply(_e, __spreadArray([void 0, 1, 2], a)))();
new ((_f = d[1].f).bind.apply(_f, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))();
// Element access expression with a punctuated key
new e["a-b"].f(1, 2, "string");
new ((_g = e["a-b"].f).bind.apply(_g, __spreadArrays([void 0, 1, 2], a)))();
new ((_h = e["a-b"].f).bind.apply(_h, __spreadArrays([void 0, 1, 2], a, ["string"])))();
new ((_g = e["a-b"].f).bind.apply(_g, __spreadArray([void 0, 1, 2], a)))();
new ((_h = e["a-b"].f).bind.apply(_h, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))();
// Basic expression
new B(1, 2, "string");
new (B.bind.apply(B, __spreadArrays([void 0, 1, 2], a)))();
new (B.bind.apply(B, __spreadArrays([void 0, 1, 2], a, ["string"])))();
new (B.bind.apply(B, __spreadArray([void 0, 1, 2], a)))();
new (B.bind.apply(B, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))();
// Property access expression
new c["a-b"](1, 2, "string");
new ((_j = c["a-b"]).bind.apply(_j, __spreadArrays([void 0, 1, 2], a)))();
new ((_k = c["a-b"]).bind.apply(_k, __spreadArrays([void 0, 1, 2], a, ["string"])))();
new ((_j = c["a-b"]).bind.apply(_j, __spreadArray([void 0, 1, 2], a)))();
new ((_k = c["a-b"]).bind.apply(_k, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))();
// Parenthesised expression
new (c["a-b"])(1, 2, "string");
new ((_l = (c["a-b"])).bind.apply(_l, __spreadArrays([void 0, 1, 2], a)))();
new ((_m = (c["a-b"])).bind.apply(_m, __spreadArrays([void 0, 1, 2], a, ["string"])))();
new ((_l = (c["a-b"])).bind.apply(_l, __spreadArray([void 0, 1, 2], a)))();
new ((_m = (c["a-b"])).bind.apply(_m, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))();
// Element access expression
new g[1]["a-b"](1, 2, "string");
new ((_o = g[1]["a-b"]).bind.apply(_o, __spreadArrays([void 0, 1, 2], a)))();
new ((_p = g[1]["a-b"]).bind.apply(_p, __spreadArrays([void 0, 1, 2], a, ["string"])))();
new ((_o = g[1]["a-b"]).bind.apply(_o, __spreadArray([void 0, 1, 2], a)))();
new ((_p = g[1]["a-b"]).bind.apply(_p, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))();
// Element access expression with a punctuated key
new h["a-b"]["a-b"](1, 2, "string");
new ((_q = h["a-b"]["a-b"]).bind.apply(_q, __spreadArrays([void 0, 1, 2], a)))();
new ((_r = h["a-b"]["a-b"]).bind.apply(_r, __spreadArrays([void 0, 1, 2], a, ["string"])))();
new ((_q = h["a-b"]["a-b"]).bind.apply(_q, __spreadArray([void 0, 1, 2], a)))();
new ((_r = h["a-b"]["a-b"]).bind.apply(_r, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))();
// Element access expression with a number
new i["a-b"][1](1, 2, "string");
new ((_s = i["a-b"][1]).bind.apply(_s, __spreadArrays([void 0, 1, 2], a)))();
new ((_t = i["a-b"][1]).bind.apply(_t, __spreadArrays([void 0, 1, 2], a, ["string"])))();
new ((_s = i["a-b"][1]).bind.apply(_s, __spreadArray([void 0, 1, 2], a)))();
new ((_t = i["a-b"][1]).bind.apply(_t, __spreadArray(__spreadArray([void 0, 1, 2], a), ["string"])))();
+5 -7
View File
@@ -8,19 +8,17 @@ export function f() {
//// [noCrashOnNoLib.js]
"use strict";
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
exports.__esModule = true;
exports.f = void 0;
function f() {
var e;
while (true) {
e = __spreadArrays((e || []));
e = __spreadArray([], (e || []));
}
}
exports.f = f;
@@ -73,12 +73,10 @@ var __asyncValues = (this && this.__asyncValues) || function (o) {
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
};
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
function fn(a, b, c, d, e, f, g) {
var c_1, c_1_1;
@@ -96,7 +94,7 @@ function fn(a, b, c, d, e, f, g) {
b++;
--b;
a === b;
__spreadArrays(c);
__spreadArray([], c);
for (_i = 0, c_2 = c; _i < c_2.length; _i++) {
s = c_2[_i];
fn(b, b, c, d, e, f, g);
@@ -29,12 +29,10 @@ function f4(...args: readonly string[]) {
//// [readonlyRestParameters.js]
"use strict";
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
function f0(a, b) {
f0(a, b);
@@ -48,7 +46,7 @@ function f1() {
}
f0.apply(void 0, args); // Error
f1('abc', 'def');
f1.apply(void 0, __spreadArrays(['abc'], args));
f1.apply(void 0, __spreadArray(['abc'], args));
f1.apply(void 0, args);
}
function f2() {
@@ -58,10 +56,10 @@ function f2() {
}
f0.apply(void 0, args);
f1('abc', 'def');
f1.apply(void 0, __spreadArrays(['abc'], args));
f1.apply(void 0, __spreadArray(['abc'], args));
f1.apply(void 0, args);
f2('abc', 'def');
f2.apply(void 0, __spreadArrays(['abc'], args)); // Error
f2.apply(void 0, __spreadArray(['abc'], args)); // Error
f2.apply(void 0, args);
}
function f4() {
@@ -17,15 +17,13 @@ function a<T>(l: Recur<T>[]): void {
//// [recursiveReverseMappedType.js]
"use strict";
// Repro from #38198
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
function join(l) {
return __spreadArrays(['marker'], l);
return __spreadArray(['marker'], l);
}
function a(l) {
var x = join(l);
@@ -132,12 +132,10 @@ function level(h: HTMLHeadingElement): number {
//// [recursiveTypeReferences1.js]
"use strict";
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
var a0 = 1;
var a1 = [1, [2, 3], [4, [5, [6, 7]]]];
@@ -187,7 +185,7 @@ function parse(node, index) {
if (index === void 0) { index = []; }
return html('ul', node.map(function (_a, i) {
var el = _a[0], children = _a[1];
var idx = __spreadArrays(index, [i + 1]);
var idx = __spreadArray(__spreadArray([], index), [i + 1]);
return html('li', [
html('a', { href: "#" + el.id, rel: 'noopener', 'data-index': idx.join('.') }, el.textContent),
children.length > 0 ? parse(children, idx) : frag()
@@ -101,12 +101,10 @@ const funcUnionTupleRest: TupleUnionFunc = (...params) => {
//// [restTuplesFromContextualTypes.js]
"use strict";
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
(function (a, b, c) { }).apply(void 0, t1);
(function () {
@@ -208,31 +206,31 @@ f2(function (a, b, c) {
x[_i - 3] = arguments[_i];
}
});
(function (a, b, c) { }).apply(void 0, __spreadArrays([1], t3));
(function (a, b, c) { }).apply(void 0, __spreadArray([1], t3));
(function () {
var x = [];
for (var _i = 0; _i < arguments.length; _i++) {
x[_i] = arguments[_i];
}
}).apply(void 0, __spreadArrays([1], t3));
}).apply(void 0, __spreadArray([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));
}).apply(void 0, __spreadArray([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));
}).apply(void 0, __spreadArray([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));
}).apply(void 0, __spreadArray([1], t3));
f3(function (a, b, c) { });
f3(function () {
var x = [];
@@ -270,13 +268,13 @@ function f4(t) {
for (var _i = 1; _i < arguments.length; _i++) {
x[_i - 1] = arguments[_i];
}
}).apply(void 0, __spreadArrays([1], t));
}).apply(void 0, __spreadArray([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));
}).apply(void 0, __spreadArray([1, 2], t));
function f(cb) { }
f(function () {
var x = [];
@@ -6,15 +6,13 @@ for (const subcomponent of [1, 2, 3]) {
//// [selfReferencingSpreadInLoop.js]
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
var additional = [];
for (var _i = 0, _a = [1, 2, 3]; _i < _a.length; _i++) {
var subcomponent = _a[_i];
additional = __spreadArrays(additional, [subcomponent]);
additional = __spreadArray(__spreadArray([], additional), [subcomponent]);
}
+10 -12
View File
@@ -25,22 +25,20 @@ k6 = [1, ...sbb_];
//// [spliceTuples.js]
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
var k1;
k1 = __spreadArrays([1], sb);
k1 = __spreadArray([1], sb);
var k2;
k2 = __spreadArrays([1], sb, [1]);
k2 = __spreadArray(__spreadArray([1], sb), [1]);
var k3;
k3 = __spreadArrays([1], sb_);
k3 = __spreadArray([1], sb_);
var k4;
k4 = __spreadArrays([1], sbb_);
k4 = __spreadArray([1], sbb_);
var k5;
k5 = __spreadArrays([1], sbb_);
k5 = __spreadArray([1], sbb_);
var k6;
k6 = __spreadArrays([1], sbb_);
k6 = __spreadArray([1], sbb_);
@@ -8,11 +8,9 @@ declare let foo2: Foo;
foo1 = [...Array.isArray(foo2) ? foo2 : [foo2]];
//// [spreadBooleanRespectsFreshness.js]
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
foo1 = __spreadArrays(Array.isArray(foo2) ? foo2 : [foo2]);
foo1 = __spreadArray([], Array.isArray(foo2) ? foo2 : [foo2]);
@@ -468,9 +468,10 @@ var __read = (this && this.__read) || function (o, n) {
}
return ar;
};
var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
var s = "Hello, world";
console.log(s);
@@ -495,7 +496,8 @@ function secondsecond_part1Spread() {
b[_i] = arguments[_i];
}
}
secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30]));
var secondsecond_part1_ar = [20, 30];
secondsecond_part1Spread.apply(void 0, __spreadArray([10], __read(secondsecond_part1_ar)));
var C = (function () {
function C() {
}
@@ -512,7 +514,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;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,IAAM,qBAAqB,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AACvC,wBAAwB,8BAAC,EAAE,UAAK,qBAAqB,IAAE;ACdvD;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]
===================================================================
@@ -552,9 +554,10 @@ sourceFile:../../../first/first_PART1.ts
>>> }
>>> return ar;
>>>};
>>>var __spread = (this && this.__spread) || function () {
>>> for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
>>> return ar;
>>>var __spreadArray = (this && this.__spreadArray) || function (to, from) {
>>> for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
>>> to[j] = from[i];
>>> return to;
>>>};
>>>var s = "Hello, world";
1 >
@@ -573,12 +576,12 @@ sourceFile:../../../first/first_PART1.ts
4 > =
5 > "Hello, world"
6 > ;
1 >Emitted(32, 1) Source(5, 1) + SourceIndex(0)
2 >Emitted(32, 5) Source(5, 7) + SourceIndex(0)
3 >Emitted(32, 6) Source(5, 8) + SourceIndex(0)
4 >Emitted(32, 9) Source(5, 11) + SourceIndex(0)
5 >Emitted(32, 23) Source(5, 25) + SourceIndex(0)
6 >Emitted(32, 24) Source(5, 26) + SourceIndex(0)
1 >Emitted(33, 1) Source(5, 1) + SourceIndex(0)
2 >Emitted(33, 5) Source(5, 7) + SourceIndex(0)
3 >Emitted(33, 6) Source(5, 8) + SourceIndex(0)
4 >Emitted(33, 9) Source(5, 11) + SourceIndex(0)
5 >Emitted(33, 23) Source(5, 25) + SourceIndex(0)
6 >Emitted(33, 24) Source(5, 26) + SourceIndex(0)
---
>>>console.log(s);
1 >
@@ -604,14 +607,14 @@ sourceFile:../../../first/first_PART1.ts
6 > s
7 > )
8 > ;
1 >Emitted(33, 1) Source(11, 1) + SourceIndex(0)
2 >Emitted(33, 8) Source(11, 8) + SourceIndex(0)
3 >Emitted(33, 9) Source(11, 9) + SourceIndex(0)
4 >Emitted(33, 12) Source(11, 12) + SourceIndex(0)
5 >Emitted(33, 13) Source(11, 13) + SourceIndex(0)
6 >Emitted(33, 14) Source(11, 14) + SourceIndex(0)
7 >Emitted(33, 15) Source(11, 15) + SourceIndex(0)
8 >Emitted(33, 16) Source(11, 16) + SourceIndex(0)
1 >Emitted(34, 1) Source(11, 1) + SourceIndex(0)
2 >Emitted(34, 8) Source(11, 8) + SourceIndex(0)
3 >Emitted(34, 9) Source(11, 9) + SourceIndex(0)
4 >Emitted(34, 12) Source(11, 12) + SourceIndex(0)
5 >Emitted(34, 13) Source(11, 13) + SourceIndex(0)
6 >Emitted(34, 14) Source(11, 14) + SourceIndex(0)
7 >Emitted(34, 15) Source(11, 15) + SourceIndex(0)
8 >Emitted(34, 16) Source(11, 16) + SourceIndex(0)
---
>>>function forfirstfirst_PART1Rest() {
1->
@@ -622,9 +625,9 @@ sourceFile:../../../first/first_PART1.ts
>
2 >function
3 > forfirstfirst_PART1Rest
1->Emitted(34, 1) Source(12, 1) + SourceIndex(0)
2 >Emitted(34, 10) Source(12, 10) + SourceIndex(0)
3 >Emitted(34, 33) Source(12, 33) + SourceIndex(0)
1->Emitted(35, 1) Source(12, 1) + SourceIndex(0)
2 >Emitted(35, 10) Source(12, 10) + SourceIndex(0)
3 >Emitted(35, 33) Source(12, 33) + SourceIndex(0)
---
>>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]);
1->^^^^
@@ -678,31 +681,31 @@ sourceFile:../../../first/first_PART1.ts
23> { b, ...rest }
24> = { a: 10, b: 30, yy: 30 }
25> ;
1->Emitted(35, 5) Source(13, 1) + SourceIndex(0)
2 >Emitted(35, 9) Source(13, 7) + SourceIndex(0)
3 >Emitted(35, 14) Source(13, 24) + SourceIndex(0)
4 >Emitted(35, 16) Source(13, 26) + SourceIndex(0)
5 >Emitted(35, 17) Source(13, 27) + SourceIndex(0)
6 >Emitted(35, 19) Source(13, 29) + SourceIndex(0)
7 >Emitted(35, 21) Source(13, 31) + SourceIndex(0)
8 >Emitted(35, 23) Source(13, 33) + SourceIndex(0)
9 >Emitted(35, 24) Source(13, 34) + SourceIndex(0)
10>Emitted(35, 26) Source(13, 36) + SourceIndex(0)
11>Emitted(35, 28) Source(13, 38) + SourceIndex(0)
12>Emitted(35, 30) Source(13, 40) + SourceIndex(0)
13>Emitted(35, 32) Source(13, 42) + SourceIndex(0)
14>Emitted(35, 34) Source(13, 44) + SourceIndex(0)
15>Emitted(35, 36) Source(13, 46) + SourceIndex(0)
16>Emitted(35, 38) Source(13, 48) + SourceIndex(0)
17>Emitted(35, 40) Source(13, 9) + SourceIndex(0)
18>Emitted(35, 41) Source(13, 10) + SourceIndex(0)
19>Emitted(35, 48) Source(13, 10) + SourceIndex(0)
20>Emitted(35, 50) Source(13, 15) + SourceIndex(0)
21>Emitted(35, 54) Source(13, 19) + SourceIndex(0)
22>Emitted(35, 68) Source(13, 7) + SourceIndex(0)
23>Emitted(35, 73) Source(13, 21) + SourceIndex(0)
24>Emitted(35, 74) Source(13, 48) + SourceIndex(0)
25>Emitted(35, 75) Source(13, 49) + SourceIndex(0)
1->Emitted(36, 5) Source(13, 1) + SourceIndex(0)
2 >Emitted(36, 9) Source(13, 7) + SourceIndex(0)
3 >Emitted(36, 14) Source(13, 24) + SourceIndex(0)
4 >Emitted(36, 16) Source(13, 26) + SourceIndex(0)
5 >Emitted(36, 17) Source(13, 27) + SourceIndex(0)
6 >Emitted(36, 19) Source(13, 29) + SourceIndex(0)
7 >Emitted(36, 21) Source(13, 31) + SourceIndex(0)
8 >Emitted(36, 23) Source(13, 33) + SourceIndex(0)
9 >Emitted(36, 24) Source(13, 34) + SourceIndex(0)
10>Emitted(36, 26) Source(13, 36) + SourceIndex(0)
11>Emitted(36, 28) Source(13, 38) + SourceIndex(0)
12>Emitted(36, 30) Source(13, 40) + SourceIndex(0)
13>Emitted(36, 32) Source(13, 42) + SourceIndex(0)
14>Emitted(36, 34) Source(13, 44) + SourceIndex(0)
15>Emitted(36, 36) Source(13, 46) + SourceIndex(0)
16>Emitted(36, 38) Source(13, 48) + SourceIndex(0)
17>Emitted(36, 40) Source(13, 9) + SourceIndex(0)
18>Emitted(36, 41) Source(13, 10) + SourceIndex(0)
19>Emitted(36, 48) Source(13, 10) + SourceIndex(0)
20>Emitted(36, 50) Source(13, 15) + SourceIndex(0)
21>Emitted(36, 54) Source(13, 19) + SourceIndex(0)
22>Emitted(36, 68) Source(13, 7) + SourceIndex(0)
23>Emitted(36, 73) Source(13, 21) + SourceIndex(0)
24>Emitted(36, 74) Source(13, 48) + SourceIndex(0)
25>Emitted(36, 75) Source(13, 49) + SourceIndex(0)
---
>>>}
1 >
@@ -711,8 +714,8 @@ sourceFile:../../../first/first_PART1.ts
1 >
>
2 >}
1 >Emitted(36, 1) Source(14, 1) + SourceIndex(0)
2 >Emitted(36, 2) Source(14, 2) + SourceIndex(0)
1 >Emitted(37, 1) Source(14, 1) + SourceIndex(0)
2 >Emitted(37, 2) Source(14, 2) + SourceIndex(0)
---
>>>console.log(s);
1->
@@ -732,14 +735,14 @@ sourceFile:../../../first/first_PART1.ts
6 > s
7 > )
8 > ;
1->Emitted(37, 1) Source(14, 2) + SourceIndex(0)
2 >Emitted(37, 8) Source(14, 9) + SourceIndex(0)
3 >Emitted(37, 9) Source(14, 10) + SourceIndex(0)
4 >Emitted(37, 12) Source(14, 13) + SourceIndex(0)
5 >Emitted(37, 13) Source(14, 14) + SourceIndex(0)
6 >Emitted(37, 14) Source(14, 15) + SourceIndex(0)
7 >Emitted(37, 15) Source(14, 16) + SourceIndex(0)
8 >Emitted(37, 16) Source(14, 17) + SourceIndex(0)
1->Emitted(38, 1) Source(14, 2) + SourceIndex(0)
2 >Emitted(38, 8) Source(14, 9) + SourceIndex(0)
3 >Emitted(38, 9) Source(14, 10) + SourceIndex(0)
4 >Emitted(38, 12) Source(14, 13) + SourceIndex(0)
5 >Emitted(38, 13) Source(14, 14) + SourceIndex(0)
6 >Emitted(38, 14) Source(14, 15) + SourceIndex(0)
7 >Emitted(38, 15) Source(14, 16) + SourceIndex(0)
8 >Emitted(38, 16) Source(14, 17) + SourceIndex(0)
---
-------------------------------------------------------------------
emittedFile:/src/third/thirdjs/output/third-output.js
@@ -764,15 +767,15 @@ sourceFile:../../../first/first_part2.ts
7 > ()
8 > )
9 > ;
1->Emitted(38, 1) Source(1, 1) + SourceIndex(1)
2 >Emitted(38, 8) Source(1, 8) + SourceIndex(1)
3 >Emitted(38, 9) Source(1, 9) + SourceIndex(1)
4 >Emitted(38, 12) Source(1, 12) + SourceIndex(1)
5 >Emitted(38, 13) Source(1, 13) + SourceIndex(1)
6 >Emitted(38, 14) Source(1, 14) + SourceIndex(1)
7 >Emitted(38, 16) Source(1, 16) + SourceIndex(1)
8 >Emitted(38, 17) Source(1, 17) + SourceIndex(1)
9 >Emitted(38, 18) Source(1, 18) + SourceIndex(1)
1->Emitted(39, 1) Source(1, 1) + SourceIndex(1)
2 >Emitted(39, 8) Source(1, 8) + SourceIndex(1)
3 >Emitted(39, 9) Source(1, 9) + SourceIndex(1)
4 >Emitted(39, 12) Source(1, 12) + SourceIndex(1)
5 >Emitted(39, 13) Source(1, 13) + SourceIndex(1)
6 >Emitted(39, 14) Source(1, 14) + SourceIndex(1)
7 >Emitted(39, 16) Source(1, 16) + SourceIndex(1)
8 >Emitted(39, 17) Source(1, 17) + SourceIndex(1)
9 >Emitted(39, 18) Source(1, 18) + SourceIndex(1)
---
-------------------------------------------------------------------
emittedFile:/src/third/thirdjs/output/third-output.js
@@ -786,9 +789,9 @@ sourceFile:../../../first/first_part3.ts
1 >
2 >function
3 > f
1 >Emitted(39, 1) Source(1, 1) + SourceIndex(2)
2 >Emitted(39, 10) Source(1, 10) + SourceIndex(2)
3 >Emitted(39, 11) Source(1, 11) + SourceIndex(2)
1 >Emitted(40, 1) Source(1, 1) + SourceIndex(2)
2 >Emitted(40, 10) Source(1, 10) + SourceIndex(2)
3 >Emitted(40, 11) Source(1, 11) + SourceIndex(2)
---
>>> return "JS does hoists";
1->^^^^
@@ -800,10 +803,10 @@ sourceFile:../../../first/first_part3.ts
2 > return
3 > "JS does hoists"
4 > ;
1->Emitted(40, 5) Source(2, 5) + SourceIndex(2)
2 >Emitted(40, 12) Source(2, 12) + SourceIndex(2)
3 >Emitted(40, 28) Source(2, 28) + SourceIndex(2)
4 >Emitted(40, 29) Source(2, 29) + SourceIndex(2)
1->Emitted(41, 5) Source(2, 5) + SourceIndex(2)
2 >Emitted(41, 12) Source(2, 12) + SourceIndex(2)
3 >Emitted(41, 28) Source(2, 28) + SourceIndex(2)
4 >Emitted(41, 29) Source(2, 29) + SourceIndex(2)
---
>>>}
1 >
@@ -812,8 +815,8 @@ sourceFile:../../../first/first_part3.ts
1 >
>
2 >}
1 >Emitted(41, 1) Source(3, 1) + SourceIndex(2)
2 >Emitted(41, 2) Source(3, 2) + SourceIndex(2)
1 >Emitted(42, 1) Source(3, 1) + SourceIndex(2)
2 >Emitted(42, 2) Source(3, 2) + SourceIndex(2)
---
-------------------------------------------------------------------
emittedFile:/src/third/thirdjs/output/third-output.js
@@ -839,10 +842,10 @@ sourceFile:../../../second/second_part1.ts
>
> f();
> }
1->Emitted(42, 1) Source(5, 1) + SourceIndex(3)
2 >Emitted(42, 5) Source(5, 11) + SourceIndex(3)
3 >Emitted(42, 6) Source(5, 12) + SourceIndex(3)
4 >Emitted(42, 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->
@@ -852,9 +855,9 @@ sourceFile:../../../second/second_part1.ts
1->
2 >namespace
3 > N
1->Emitted(43, 1) Source(5, 1) + SourceIndex(3)
2 >Emitted(43, 12) Source(5, 11) + SourceIndex(3)
3 >Emitted(43, 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->^^^^
@@ -865,9 +868,9 @@ sourceFile:../../../second/second_part1.ts
>
2 > function
3 > f
1->Emitted(44, 5) Source(6, 5) + SourceIndex(3)
2 >Emitted(44, 14) Source(6, 14) + SourceIndex(3)
3 >Emitted(44, 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->^^^^^^^^
@@ -887,14 +890,14 @@ sourceFile:../../../second/second_part1.ts
6 > 'testing'
7 > )
8 > ;
1->Emitted(45, 9) Source(7, 9) + SourceIndex(3)
2 >Emitted(45, 16) Source(7, 16) + SourceIndex(3)
3 >Emitted(45, 17) Source(7, 17) + SourceIndex(3)
4 >Emitted(45, 20) Source(7, 20) + SourceIndex(3)
5 >Emitted(45, 21) Source(7, 21) + SourceIndex(3)
6 >Emitted(45, 30) Source(7, 30) + SourceIndex(3)
7 >Emitted(45, 31) Source(7, 31) + SourceIndex(3)
8 >Emitted(45, 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 >^^^^
@@ -903,8 +906,8 @@ sourceFile:../../../second/second_part1.ts
1 >
>
2 > }
1 >Emitted(46, 5) Source(8, 5) + SourceIndex(3)
2 >Emitted(46, 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->^^^^
@@ -918,10 +921,10 @@ sourceFile:../../../second/second_part1.ts
2 > f
3 > ()
4 > ;
1->Emitted(47, 5) Source(10, 5) + SourceIndex(3)
2 >Emitted(47, 6) Source(10, 6) + SourceIndex(3)
3 >Emitted(47, 8) Source(10, 8) + SourceIndex(3)
4 >Emitted(47, 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->
@@ -946,13 +949,13 @@ sourceFile:../../../second/second_part1.ts
>
> f();
> }
1->Emitted(48, 1) Source(11, 1) + SourceIndex(3)
2 >Emitted(48, 2) Source(11, 2) + SourceIndex(3)
3 >Emitted(48, 4) Source(5, 11) + SourceIndex(3)
4 >Emitted(48, 5) Source(5, 12) + SourceIndex(3)
5 >Emitted(48, 10) Source(5, 11) + SourceIndex(3)
6 >Emitted(48, 11) Source(5, 12) + SourceIndex(3)
7 >Emitted(48, 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 secondsecond_part1Spread() {
1->
@@ -963,9 +966,9 @@ sourceFile:../../../second/second_part1.ts
>
2 >function
3 > secondsecond_part1Spread
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)
1->Emitted(50, 1) Source(13, 1) + SourceIndex(3)
2 >Emitted(50, 10) Source(13, 10) + SourceIndex(3)
3 >Emitted(50, 34) Source(13, 34) + SourceIndex(3)
---
>>> var b = [];
1 >^^^^
@@ -973,8 +976,8 @@ sourceFile:../../../second/second_part1.ts
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >(
2 > ...b: number[]
1 >Emitted(50, 5) Source(13, 35) + SourceIndex(3)
2 >Emitted(50, 16) Source(13, 49) + SourceIndex(3)
1 >Emitted(51, 5) Source(13, 35) + SourceIndex(3)
2 >Emitted(51, 16) Source(13, 49) + SourceIndex(3)
---
>>> for (var _i = 0; _i < arguments.length; _i++) {
1->^^^^^^^^^
@@ -989,66 +992,88 @@ sourceFile:../../../second/second_part1.ts
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)
1->Emitted(52, 10) Source(13, 35) + SourceIndex(3)
2 >Emitted(52, 20) Source(13, 49) + SourceIndex(3)
3 >Emitted(52, 22) Source(13, 35) + SourceIndex(3)
4 >Emitted(52, 43) Source(13, 49) + SourceIndex(3)
5 >Emitted(52, 45) Source(13, 35) + SourceIndex(3)
6 >Emitted(52, 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 >Emitted(53, 9) Source(13, 35) + SourceIndex(3)
2 >Emitted(53, 31) Source(13, 49) + SourceIndex(3)
---
>>> }
>>>}
1 >
2 >^
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >) {
2 >}
1 >Emitted(54, 1) Source(13, 53) + SourceIndex(3)
2 >Emitted(54, 2) Source(13, 54) + SourceIndex(3)
1 >Emitted(55, 1) Source(13, 53) + SourceIndex(3)
2 >Emitted(55, 2) Source(13, 54) + SourceIndex(3)
---
>>>secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30]));
>>>var secondsecond_part1_ar = [20, 30];
1->
2 >^^^^
3 > ^^^^^^^^^^^^^^^^^^^^^
4 > ^^^
5 > ^
6 > ^^
7 > ^^
8 > ^^
9 > ^
10> ^
11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1->
>
2 >const
3 > secondsecond_part1_ar
4 > =
5 > [
6 > 20
7 > ,
8 > 30
9 > ]
10> ;
1->Emitted(56, 1) Source(14, 1) + SourceIndex(3)
2 >Emitted(56, 5) Source(14, 7) + SourceIndex(3)
3 >Emitted(56, 26) Source(14, 28) + SourceIndex(3)
4 >Emitted(56, 29) Source(14, 31) + SourceIndex(3)
5 >Emitted(56, 30) Source(14, 32) + SourceIndex(3)
6 >Emitted(56, 32) Source(14, 34) + SourceIndex(3)
7 >Emitted(56, 34) Source(14, 36) + SourceIndex(3)
8 >Emitted(56, 36) Source(14, 38) + SourceIndex(3)
9 >Emitted(56, 37) Source(14, 39) + SourceIndex(3)
10>Emitted(56, 38) Source(14, 40) + SourceIndex(3)
---
>>>secondsecond_part1Spread.apply(void 0, __spreadArray([10], __read(secondsecond_part1_ar)));
1->
2 >^^^^^^^^^^^^^^^^^^^^^^^^
3 > ^^^^^^^^^^^^^^^^^^^^^^^^
4 > ^
5 > ^^
6 > ^^
7 > ^^
8 > ^^
9 > ^^
10> ^
11> ^^^
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4 > ^^
5 > ^^^^^^^^^^
6 > ^^^^^^^^^^^^^^^^^^^^^
7 > ^^^^
1->
>
2 >secondsecond_part1Spread
3 > (...
4 > [
5 > 10
6 > ,
7 > 20
8 > ,
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)
3 > (
4 > 10
5 > , ...
6 > secondsecond_part1_ar
7 > );
1->Emitted(57, 1) Source(15, 1) + SourceIndex(3)
2 >Emitted(57, 25) Source(15, 25) + SourceIndex(3)
3 >Emitted(57, 55) Source(15, 26) + SourceIndex(3)
4 >Emitted(57, 57) Source(15, 28) + SourceIndex(3)
5 >Emitted(57, 67) Source(15, 33) + SourceIndex(3)
6 >Emitted(57, 88) Source(15, 54) + SourceIndex(3)
7 >Emitted(57, 92) Source(15, 56) + SourceIndex(3)
---
-------------------------------------------------------------------
emittedFile:/src/third/thirdjs/output/third-output.js
@@ -1058,13 +1083,13 @@ sourceFile:../../../second/second_part2.ts
1 >
2 >^^^^^^^^^^^^^^^^^^^->
1 >
1 >Emitted(56, 1) Source(1, 1) + SourceIndex(4)
1 >Emitted(58, 1) Source(1, 1) + SourceIndex(4)
---
>>> function C() {
1->^^^^
2 > ^^->
1->
1->Emitted(57, 5) Source(1, 1) + SourceIndex(4)
1->Emitted(59, 5) Source(1, 1) + SourceIndex(4)
---
>>> }
1->^^^^
@@ -1076,8 +1101,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(60, 5) Source(5, 1) + SourceIndex(4)
2 >Emitted(60, 6) Source(5, 2) + SourceIndex(4)
---
>>> C.prototype.doSomething = function () {
1->^^^^
@@ -1087,9 +1112,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(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)
---
>>> console.log("something got done");
1->^^^^^^^^
@@ -1109,14 +1134,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(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 >^^^^
@@ -1125,8 +1150,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(63, 5) Source(4, 5) + SourceIndex(4)
2 >Emitted(63, 6) Source(4, 6) + SourceIndex(4)
---
>>> return C;
1->^^^^
@@ -1134,8 +1159,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(64, 5) Source(5, 1) + SourceIndex(4)
2 >Emitted(64, 13) Source(5, 2) + SourceIndex(4)
---
>>>}());
1 >
@@ -1151,10 +1176,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(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)
---
-------------------------------------------------------------------
emittedFile:/src/third/thirdjs/output/third-output.js
@@ -1178,14 +1203,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(66, 1) Source(1, 1) + SourceIndex(5)
2 >Emitted(66, 5) Source(1, 5) + SourceIndex(5)
3 >Emitted(66, 6) Source(1, 6) + SourceIndex(5)
4 >Emitted(66, 9) Source(1, 9) + SourceIndex(5)
5 >Emitted(66, 13) Source(1, 13) + SourceIndex(5)
6 >Emitted(66, 14) Source(1, 14) + SourceIndex(5)
7 >Emitted(66, 16) Source(1, 16) + SourceIndex(5)
8 >Emitted(66, 17) Source(1, 17) + SourceIndex(5)
---
>>>c.doSomething();
1->
@@ -1202,12 +1227,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(67, 1) Source(2, 1) + SourceIndex(5)
2 >Emitted(67, 2) Source(2, 2) + SourceIndex(5)
3 >Emitted(67, 3) Source(2, 3) + SourceIndex(5)
4 >Emitted(67, 14) Source(2, 14) + SourceIndex(5)
5 >Emitted(67, 16) Source(2, 16) + SourceIndex(5)
6 >Emitted(67, 17) Source(2, 17) + SourceIndex(5)
---
>>>function forthirdthird_part1Rest() {
1->
@@ -1218,9 +1243,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(68, 1) Source(3, 1) + SourceIndex(5)
2 >Emitted(68, 10) Source(3, 10) + SourceIndex(5)
3 >Emitted(68, 33) Source(3, 33) + SourceIndex(5)
---
>>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]);
1->^^^^
@@ -1274,31 +1299,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(69, 5) Source(4, 1) + SourceIndex(5)
2 >Emitted(69, 9) Source(4, 7) + SourceIndex(5)
3 >Emitted(69, 14) Source(4, 24) + SourceIndex(5)
4 >Emitted(69, 16) Source(4, 26) + SourceIndex(5)
5 >Emitted(69, 17) Source(4, 27) + SourceIndex(5)
6 >Emitted(69, 19) Source(4, 29) + SourceIndex(5)
7 >Emitted(69, 21) Source(4, 31) + SourceIndex(5)
8 >Emitted(69, 23) Source(4, 33) + SourceIndex(5)
9 >Emitted(69, 24) Source(4, 34) + SourceIndex(5)
10>Emitted(69, 26) Source(4, 36) + SourceIndex(5)
11>Emitted(69, 28) Source(4, 38) + SourceIndex(5)
12>Emitted(69, 30) Source(4, 40) + SourceIndex(5)
13>Emitted(69, 32) Source(4, 42) + SourceIndex(5)
14>Emitted(69, 34) Source(4, 44) + SourceIndex(5)
15>Emitted(69, 36) Source(4, 46) + SourceIndex(5)
16>Emitted(69, 38) Source(4, 48) + SourceIndex(5)
17>Emitted(69, 40) Source(4, 9) + SourceIndex(5)
18>Emitted(69, 41) Source(4, 10) + SourceIndex(5)
19>Emitted(69, 48) Source(4, 10) + SourceIndex(5)
20>Emitted(69, 50) Source(4, 15) + SourceIndex(5)
21>Emitted(69, 54) Source(4, 19) + SourceIndex(5)
22>Emitted(69, 68) Source(4, 7) + SourceIndex(5)
23>Emitted(69, 73) Source(4, 21) + SourceIndex(5)
24>Emitted(69, 74) Source(4, 48) + SourceIndex(5)
25>Emitted(69, 75) Source(4, 49) + SourceIndex(5)
---
>>>}
1 >
@@ -1307,8 +1332,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(70, 1) Source(5, 1) + SourceIndex(5)
2 >Emitted(70, 2) Source(5, 2) + SourceIndex(5)
---
>>>//# sourceMappingURL=third-output.js.map
@@ -1335,39 +1360,39 @@ sourceFile:../../third_part1.ts
},
{
"pos": 1008,
"end": 1178,
"end": 1199,
"kind": "emitHelpers",
"data": "typescript:spread"
"data": "typescript:spreadArray"
},
{
"pos": 1180,
"end": 1424,
"pos": 1201,
"end": 1445,
"kind": "prepend",
"data": "../../../first/bin/first-output.js",
"texts": [
{
"pos": 1180,
"end": 1424,
"pos": 1201,
"end": 1445,
"kind": "text"
}
]
},
{
"pos": 1424,
"end": 1925,
"pos": 1445,
"end": 2013,
"kind": "prepend",
"data": "../../../2/second-output.js",
"texts": [
{
"pos": 1424,
"end": 1925,
"pos": 1445,
"end": 2013,
"kind": "text"
}
]
},
{
"pos": 1925,
"end": 2078,
"pos": 2013,
"end": 2166,
"kind": "text"
}
],
@@ -1394,20 +1419,20 @@ sourceFile:../../third_part1.ts
},
{
"pos": 208,
"end": 374,
"end": 422,
"kind": "prepend",
"data": "../../../2/second-output.d.ts",
"texts": [
{
"pos": 208,
"end": 374,
"end": 422,
"kind": "text"
}
]
},
{
"pos": 374,
"end": 444,
"pos": 422,
"end": 492,
"kind": "text"
}
]
@@ -1451,15 +1476,16 @@ var __read = (this && this.__read) || function (o, n) {
return ar;
};
----------------------------------------------------------------------
emitHelpers: (1008-1178):: typescript:spread
var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
emitHelpers: (1008-1199):: typescript:spreadArray
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
----------------------------------------------------------------------
prepend: (1180-1424):: ../../../first/bin/first-output.js texts:: 1
prepend: (1201-1445):: ../../../first/bin/first-output.js texts:: 1
>>--------------------------------------------------------------------
text: (1180-1424)
text: (1201-1445)
var s = "Hello, world";
console.log(s);
function forfirstfirst_PART1Rest() {
@@ -1472,9 +1498,9 @@ function f() {
}
----------------------------------------------------------------------
prepend: (1424-1925):: ../../../2/second-output.js texts:: 1
prepend: (1445-2013):: ../../../2/second-output.js texts:: 1
>>--------------------------------------------------------------------
text: (1424-1925)
text: (1445-2013)
var N;
(function (N) {
function f() {
@@ -1488,7 +1514,8 @@ function secondsecond_part1Spread() {
b[_i] = arguments[_i];
}
}
secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30]));
var secondsecond_part1_ar = [20, 30];
secondsecond_part1Spread.apply(void 0, __spreadArray([10], __read(secondsecond_part1_ar)));
var C = (function () {
function C() {
}
@@ -1499,7 +1526,7 @@ var C = (function () {
}());
----------------------------------------------------------------------
text: (1925-2078)
text: (2013-2166)
var c = new C();
c.doSomething();
function forthirdthird_part1Rest() {
@@ -1524,20 +1551,21 @@ declare function forfirstfirst_PART1Rest(): void;
declare function f(): string;
----------------------------------------------------------------------
prepend: (208-374):: ../../../2/second-output.d.ts texts:: 1
prepend: (208-422):: ../../../2/second-output.d.ts texts:: 1
>>--------------------------------------------------------------------
text: (208-374)
text: (208-422)
declare namespace N {
}
declare namespace N {
}
declare function secondsecond_part1Spread(...b: number[]): void;
declare const secondsecond_part1_ar: number[];
declare class C {
doSomething(): void;
}
----------------------------------------------------------------------
text: (374-444)
text: (422-492)
declare var c: C;
declare function forthirdthird_part1Rest(): void;
@@ -425,7 +425,7 @@ declare function f(): string;
======================================================================
//// [/src/third/thirdjs/output/third-output.d.ts.map]
{"version":3,"file":"third-output.d.ts","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AAGD,iBAAS,uBAAuB,SAAM;ACXtC,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,iBAAS,wBAAwB,CAAC,GAAG,GAAG,MAAM,EAAE,QAAK;ACZrD,cAAM,CAAC;IACH,WAAW;CAGd;ACJD,QAAA,IAAI,CAAC,GAAU,CAAC;AAEhB,iBAAS,uBAAuB,SAE/B"}
{"version":3,"file":"third-output.d.ts","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AAGD,iBAAS,uBAAuB,SAAM;ACXtC,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,iBAAS,wBAAwB,CAAC,GAAG,GAAG,MAAM,EAAE,QAAK;AACrD,QAAA,MAAM,qBAAqB,UAAW,CAAC;ACbvC,cAAM,CAAC;IACH,WAAW;CAGd;ACJD,QAAA,IAAI,CAAC,GAAU,CAAC;AAEhB,iBAAS,uBAAuB,SAE/B"}
//// [/src/third/thirdjs/output/third-output.d.ts.map.baseline.txt]
===================================================================
@@ -656,6 +656,27 @@ sourceFile:../../../second/second_part1.ts
8 >Emitted(14, 57) Source(13, 49) + SourceIndex(2)
9 >Emitted(14, 65) Source(13, 54) + SourceIndex(2)
---
>>>declare const secondsecond_part1_ar: number[];
1 >
2 >^^^^^^^^
3 > ^^^^^^
4 > ^^^^^^^^^^^^^^^^^^^^^
5 > ^^^^^^^^^^
6 > ^
1 >
>
2 >
3 > const
4 > secondsecond_part1_ar
5 > = [20, 30]
6 > ;
1 >Emitted(15, 1) Source(14, 1) + SourceIndex(2)
2 >Emitted(15, 9) Source(14, 1) + SourceIndex(2)
3 >Emitted(15, 15) Source(14, 7) + SourceIndex(2)
4 >Emitted(15, 36) Source(14, 28) + SourceIndex(2)
5 >Emitted(15, 46) Source(14, 39) + SourceIndex(2)
6 >Emitted(15, 47) Source(14, 40) + SourceIndex(2)
---
-------------------------------------------------------------------
emittedFile:/src/third/thirdjs/output/third-output.d.ts
sourceFile:../../../second/second_part2.ts
@@ -668,9 +689,9 @@ sourceFile:../../../second/second_part2.ts
1 >
2 >class
3 > C
1 >Emitted(15, 1) Source(1, 1) + SourceIndex(3)
2 >Emitted(15, 15) Source(1, 7) + SourceIndex(3)
3 >Emitted(15, 16) Source(1, 8) + SourceIndex(3)
1 >Emitted(16, 1) Source(1, 1) + SourceIndex(3)
2 >Emitted(16, 15) Source(1, 7) + SourceIndex(3)
3 >Emitted(16, 16) Source(1, 8) + SourceIndex(3)
---
>>> doSomething(): void;
1->^^^^
@@ -678,8 +699,8 @@ sourceFile:../../../second/second_part2.ts
1-> {
>
2 > doSomething
1->Emitted(16, 5) Source(2, 5) + SourceIndex(3)
2 >Emitted(16, 16) Source(2, 16) + SourceIndex(3)
1->Emitted(17, 5) Source(2, 5) + SourceIndex(3)
2 >Emitted(17, 16) Source(2, 16) + SourceIndex(3)
---
>>>}
1 >^
@@ -688,7 +709,7 @@ sourceFile:../../../second/second_part2.ts
> console.log("something got done");
> }
>}
1 >Emitted(17, 2) Source(5, 2) + SourceIndex(3)
1 >Emitted(18, 2) Source(5, 2) + SourceIndex(3)
---
-------------------------------------------------------------------
emittedFile:/src/third/thirdjs/output/third-output.d.ts
@@ -708,12 +729,12 @@ sourceFile:../../third_part1.ts
4 > c
5 > = new C()
6 > ;
1->Emitted(18, 1) Source(1, 1) + SourceIndex(4)
2 >Emitted(18, 9) Source(1, 1) + SourceIndex(4)
3 >Emitted(18, 13) Source(1, 5) + SourceIndex(4)
4 >Emitted(18, 14) Source(1, 6) + SourceIndex(4)
5 >Emitted(18, 17) Source(1, 16) + SourceIndex(4)
6 >Emitted(18, 18) Source(1, 17) + SourceIndex(4)
1->Emitted(19, 1) Source(1, 1) + SourceIndex(4)
2 >Emitted(19, 9) Source(1, 1) + SourceIndex(4)
3 >Emitted(19, 13) Source(1, 5) + SourceIndex(4)
4 >Emitted(19, 14) Source(1, 6) + SourceIndex(4)
5 >Emitted(19, 17) Source(1, 16) + SourceIndex(4)
6 >Emitted(19, 18) Source(1, 17) + SourceIndex(4)
---
>>>declare function forthirdthird_part1Rest(): void;
1->
@@ -728,10 +749,10 @@ sourceFile:../../third_part1.ts
4 > () {
> const { b, ...rest } = { a: 10, b: 30, yy: 30 };
> }
1->Emitted(19, 1) Source(3, 1) + SourceIndex(4)
2 >Emitted(19, 18) Source(3, 10) + SourceIndex(4)
3 >Emitted(19, 41) Source(3, 33) + SourceIndex(4)
4 >Emitted(19, 50) Source(5, 2) + SourceIndex(4)
1->Emitted(20, 1) Source(3, 1) + SourceIndex(4)
2 >Emitted(20, 18) Source(3, 10) + SourceIndex(4)
3 >Emitted(20, 41) Source(3, 33) + SourceIndex(4)
4 >Emitted(20, 50) Source(5, 2) + SourceIndex(4)
---
>>>//# sourceMappingURL=third-output.d.ts.map
@@ -752,9 +773,10 @@ var __read = (this && this.__read) || function (o, n) {
}
return ar;
};
var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
@@ -787,7 +809,8 @@ function secondsecond_part1Spread() {
b[_i] = arguments[_i];
}
}
secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30]));
var secondsecond_part1_ar = [20, 30];
secondsecond_part1Spread.apply(void 0, __spreadArray([10], __read(secondsecond_part1_ar)));
var C = (function () {
function C() {
}
@@ -804,7 +827,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;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,IAAM,qBAAqB,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AACvC,wBAAwB,8BAAC,EAAE,UAAK,qBAAqB,IAAE;ACdvD;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]
===================================================================
@@ -833,9 +856,10 @@ sourceFile:../../../first/first_PART1.ts
>>> }
>>> return ar;
>>>};
>>>var __spread = (this && this.__spread) || function () {
>>> for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
>>> return ar;
>>>var __spreadArray = (this && this.__spreadArray) || function (to, from) {
>>> for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
>>> to[j] = from[i];
>>> return to;
>>>};
>>>var __rest = (this && this.__rest) || function (s, e) {
>>> var t = {};
@@ -865,12 +889,12 @@ sourceFile:../../../first/first_PART1.ts
4 > =
5 > "Hello, world"
6 > ;
1 >Emitted(32, 1) Source(5, 1) + SourceIndex(0)
2 >Emitted(32, 5) Source(5, 7) + SourceIndex(0)
3 >Emitted(32, 6) Source(5, 8) + SourceIndex(0)
4 >Emitted(32, 9) Source(5, 11) + SourceIndex(0)
5 >Emitted(32, 23) Source(5, 25) + SourceIndex(0)
6 >Emitted(32, 24) Source(5, 26) + SourceIndex(0)
1 >Emitted(33, 1) Source(5, 1) + SourceIndex(0)
2 >Emitted(33, 5) Source(5, 7) + SourceIndex(0)
3 >Emitted(33, 6) Source(5, 8) + SourceIndex(0)
4 >Emitted(33, 9) Source(5, 11) + SourceIndex(0)
5 >Emitted(33, 23) Source(5, 25) + SourceIndex(0)
6 >Emitted(33, 24) Source(5, 26) + SourceIndex(0)
---
>>>console.log(s);
1 >
@@ -896,14 +920,14 @@ sourceFile:../../../first/first_PART1.ts
6 > s
7 > )
8 > ;
1 >Emitted(33, 1) Source(11, 1) + SourceIndex(0)
2 >Emitted(33, 8) Source(11, 8) + SourceIndex(0)
3 >Emitted(33, 9) Source(11, 9) + SourceIndex(0)
4 >Emitted(33, 12) Source(11, 12) + SourceIndex(0)
5 >Emitted(33, 13) Source(11, 13) + SourceIndex(0)
6 >Emitted(33, 14) Source(11, 14) + SourceIndex(0)
7 >Emitted(33, 15) Source(11, 15) + SourceIndex(0)
8 >Emitted(33, 16) Source(11, 16) + SourceIndex(0)
1 >Emitted(34, 1) Source(11, 1) + SourceIndex(0)
2 >Emitted(34, 8) Source(11, 8) + SourceIndex(0)
3 >Emitted(34, 9) Source(11, 9) + SourceIndex(0)
4 >Emitted(34, 12) Source(11, 12) + SourceIndex(0)
5 >Emitted(34, 13) Source(11, 13) + SourceIndex(0)
6 >Emitted(34, 14) Source(11, 14) + SourceIndex(0)
7 >Emitted(34, 15) Source(11, 15) + SourceIndex(0)
8 >Emitted(34, 16) Source(11, 16) + SourceIndex(0)
---
>>>function forfirstfirst_PART1Rest() { }
1->
@@ -917,11 +941,11 @@ sourceFile:../../../first/first_PART1.ts
3 > forfirstfirst_PART1Rest
4 > () {
5 > }
1->Emitted(34, 1) Source(12, 1) + SourceIndex(0)
2 >Emitted(34, 10) Source(12, 10) + SourceIndex(0)
3 >Emitted(34, 33) Source(12, 33) + SourceIndex(0)
4 >Emitted(34, 38) Source(12, 38) + SourceIndex(0)
5 >Emitted(34, 39) Source(12, 39) + SourceIndex(0)
1->Emitted(35, 1) Source(12, 1) + SourceIndex(0)
2 >Emitted(35, 10) Source(12, 10) + SourceIndex(0)
3 >Emitted(35, 33) Source(12, 33) + SourceIndex(0)
4 >Emitted(35, 38) Source(12, 38) + SourceIndex(0)
5 >Emitted(35, 39) Source(12, 39) + SourceIndex(0)
---
-------------------------------------------------------------------
emittedFile:/src/third/thirdjs/output/third-output.js
@@ -946,15 +970,15 @@ sourceFile:../../../first/first_part2.ts
7 > ()
8 > )
9 > ;
1 >Emitted(35, 1) Source(1, 1) + SourceIndex(1)
2 >Emitted(35, 8) Source(1, 8) + SourceIndex(1)
3 >Emitted(35, 9) Source(1, 9) + SourceIndex(1)
4 >Emitted(35, 12) Source(1, 12) + SourceIndex(1)
5 >Emitted(35, 13) Source(1, 13) + SourceIndex(1)
6 >Emitted(35, 14) Source(1, 14) + SourceIndex(1)
7 >Emitted(35, 16) Source(1, 16) + SourceIndex(1)
8 >Emitted(35, 17) Source(1, 17) + SourceIndex(1)
9 >Emitted(35, 18) Source(1, 18) + SourceIndex(1)
1 >Emitted(36, 1) Source(1, 1) + SourceIndex(1)
2 >Emitted(36, 8) Source(1, 8) + SourceIndex(1)
3 >Emitted(36, 9) Source(1, 9) + SourceIndex(1)
4 >Emitted(36, 12) Source(1, 12) + SourceIndex(1)
5 >Emitted(36, 13) Source(1, 13) + SourceIndex(1)
6 >Emitted(36, 14) Source(1, 14) + SourceIndex(1)
7 >Emitted(36, 16) Source(1, 16) + SourceIndex(1)
8 >Emitted(36, 17) Source(1, 17) + SourceIndex(1)
9 >Emitted(36, 18) Source(1, 18) + SourceIndex(1)
---
-------------------------------------------------------------------
emittedFile:/src/third/thirdjs/output/third-output.js
@@ -968,9 +992,9 @@ sourceFile:../../../first/first_part3.ts
1 >
2 >function
3 > f
1 >Emitted(36, 1) Source(1, 1) + SourceIndex(2)
2 >Emitted(36, 10) Source(1, 10) + SourceIndex(2)
3 >Emitted(36, 11) Source(1, 11) + SourceIndex(2)
1 >Emitted(37, 1) Source(1, 1) + SourceIndex(2)
2 >Emitted(37, 10) Source(1, 10) + SourceIndex(2)
3 >Emitted(37, 11) Source(1, 11) + SourceIndex(2)
---
>>> return "JS does hoists";
1->^^^^
@@ -982,10 +1006,10 @@ sourceFile:../../../first/first_part3.ts
2 > return
3 > "JS does hoists"
4 > ;
1->Emitted(37, 5) Source(2, 5) + SourceIndex(2)
2 >Emitted(37, 12) Source(2, 12) + SourceIndex(2)
3 >Emitted(37, 28) Source(2, 28) + SourceIndex(2)
4 >Emitted(37, 29) Source(2, 29) + SourceIndex(2)
1->Emitted(38, 5) Source(2, 5) + SourceIndex(2)
2 >Emitted(38, 12) Source(2, 12) + SourceIndex(2)
3 >Emitted(38, 28) Source(2, 28) + SourceIndex(2)
4 >Emitted(38, 29) Source(2, 29) + SourceIndex(2)
---
>>>}
1 >
@@ -994,8 +1018,8 @@ sourceFile:../../../first/first_part3.ts
1 >
>
2 >}
1 >Emitted(38, 1) Source(3, 1) + SourceIndex(2)
2 >Emitted(38, 2) Source(3, 2) + SourceIndex(2)
1 >Emitted(39, 1) Source(3, 1) + SourceIndex(2)
2 >Emitted(39, 2) Source(3, 2) + SourceIndex(2)
---
-------------------------------------------------------------------
emittedFile:/src/third/thirdjs/output/third-output.js
@@ -1021,10 +1045,10 @@ sourceFile:../../../second/second_part1.ts
>
> f();
> }
1->Emitted(39, 1) Source(5, 1) + SourceIndex(3)
2 >Emitted(39, 5) Source(5, 11) + SourceIndex(3)
3 >Emitted(39, 6) Source(5, 12) + SourceIndex(3)
4 >Emitted(39, 7) Source(11, 2) + SourceIndex(3)
1->Emitted(40, 1) Source(5, 1) + SourceIndex(3)
2 >Emitted(40, 5) Source(5, 11) + SourceIndex(3)
3 >Emitted(40, 6) Source(5, 12) + SourceIndex(3)
4 >Emitted(40, 7) Source(11, 2) + SourceIndex(3)
---
>>>(function (N) {
1->
@@ -1034,9 +1058,9 @@ sourceFile:../../../second/second_part1.ts
1->
2 >namespace
3 > N
1->Emitted(40, 1) Source(5, 1) + SourceIndex(3)
2 >Emitted(40, 12) Source(5, 11) + SourceIndex(3)
3 >Emitted(40, 13) Source(5, 12) + SourceIndex(3)
1->Emitted(41, 1) Source(5, 1) + SourceIndex(3)
2 >Emitted(41, 12) Source(5, 11) + SourceIndex(3)
3 >Emitted(41, 13) Source(5, 12) + SourceIndex(3)
---
>>> function f() {
1->^^^^
@@ -1047,9 +1071,9 @@ sourceFile:../../../second/second_part1.ts
>
2 > function
3 > f
1->Emitted(41, 5) Source(6, 5) + SourceIndex(3)
2 >Emitted(41, 14) Source(6, 14) + SourceIndex(3)
3 >Emitted(41, 15) Source(6, 15) + SourceIndex(3)
1->Emitted(42, 5) Source(6, 5) + SourceIndex(3)
2 >Emitted(42, 14) Source(6, 14) + SourceIndex(3)
3 >Emitted(42, 15) Source(6, 15) + SourceIndex(3)
---
>>> console.log('testing');
1->^^^^^^^^
@@ -1069,14 +1093,14 @@ sourceFile:../../../second/second_part1.ts
6 > 'testing'
7 > )
8 > ;
1->Emitted(42, 9) Source(7, 9) + SourceIndex(3)
2 >Emitted(42, 16) Source(7, 16) + SourceIndex(3)
3 >Emitted(42, 17) Source(7, 17) + SourceIndex(3)
4 >Emitted(42, 20) Source(7, 20) + SourceIndex(3)
5 >Emitted(42, 21) Source(7, 21) + SourceIndex(3)
6 >Emitted(42, 30) Source(7, 30) + SourceIndex(3)
7 >Emitted(42, 31) Source(7, 31) + SourceIndex(3)
8 >Emitted(42, 32) Source(7, 32) + SourceIndex(3)
1->Emitted(43, 9) Source(7, 9) + SourceIndex(3)
2 >Emitted(43, 16) Source(7, 16) + SourceIndex(3)
3 >Emitted(43, 17) Source(7, 17) + SourceIndex(3)
4 >Emitted(43, 20) Source(7, 20) + SourceIndex(3)
5 >Emitted(43, 21) Source(7, 21) + SourceIndex(3)
6 >Emitted(43, 30) Source(7, 30) + SourceIndex(3)
7 >Emitted(43, 31) Source(7, 31) + SourceIndex(3)
8 >Emitted(43, 32) Source(7, 32) + SourceIndex(3)
---
>>> }
1 >^^^^
@@ -1085,8 +1109,8 @@ sourceFile:../../../second/second_part1.ts
1 >
>
2 > }
1 >Emitted(43, 5) Source(8, 5) + SourceIndex(3)
2 >Emitted(43, 6) Source(8, 6) + SourceIndex(3)
1 >Emitted(44, 5) Source(8, 5) + SourceIndex(3)
2 >Emitted(44, 6) Source(8, 6) + SourceIndex(3)
---
>>> f();
1->^^^^
@@ -1100,10 +1124,10 @@ sourceFile:../../../second/second_part1.ts
2 > f
3 > ()
4 > ;
1->Emitted(44, 5) Source(10, 5) + SourceIndex(3)
2 >Emitted(44, 6) Source(10, 6) + SourceIndex(3)
3 >Emitted(44, 8) Source(10, 8) + SourceIndex(3)
4 >Emitted(44, 9) Source(10, 9) + SourceIndex(3)
1->Emitted(45, 5) Source(10, 5) + SourceIndex(3)
2 >Emitted(45, 6) Source(10, 6) + SourceIndex(3)
3 >Emitted(45, 8) Source(10, 8) + SourceIndex(3)
4 >Emitted(45, 9) Source(10, 9) + SourceIndex(3)
---
>>>})(N || (N = {}));
1->
@@ -1128,13 +1152,13 @@ sourceFile:../../../second/second_part1.ts
>
> f();
> }
1->Emitted(45, 1) Source(11, 1) + SourceIndex(3)
2 >Emitted(45, 2) Source(11, 2) + SourceIndex(3)
3 >Emitted(45, 4) Source(5, 11) + SourceIndex(3)
4 >Emitted(45, 5) Source(5, 12) + SourceIndex(3)
5 >Emitted(45, 10) Source(5, 11) + SourceIndex(3)
6 >Emitted(45, 11) Source(5, 12) + SourceIndex(3)
7 >Emitted(45, 19) Source(11, 2) + SourceIndex(3)
1->Emitted(46, 1) Source(11, 1) + SourceIndex(3)
2 >Emitted(46, 2) Source(11, 2) + SourceIndex(3)
3 >Emitted(46, 4) Source(5, 11) + SourceIndex(3)
4 >Emitted(46, 5) Source(5, 12) + SourceIndex(3)
5 >Emitted(46, 10) Source(5, 11) + SourceIndex(3)
6 >Emitted(46, 11) Source(5, 12) + SourceIndex(3)
7 >Emitted(46, 19) Source(11, 2) + SourceIndex(3)
---
>>>function secondsecond_part1Spread() {
1->
@@ -1145,9 +1169,9 @@ sourceFile:../../../second/second_part1.ts
>
2 >function
3 > secondsecond_part1Spread
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)
1->Emitted(47, 1) Source(13, 1) + SourceIndex(3)
2 >Emitted(47, 10) Source(13, 10) + SourceIndex(3)
3 >Emitted(47, 34) Source(13, 34) + SourceIndex(3)
---
>>> var b = [];
1 >^^^^
@@ -1155,8 +1179,8 @@ sourceFile:../../../second/second_part1.ts
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >(
2 > ...b: number[]
1 >Emitted(47, 5) Source(13, 35) + SourceIndex(3)
2 >Emitted(47, 16) Source(13, 49) + SourceIndex(3)
1 >Emitted(48, 5) Source(13, 35) + SourceIndex(3)
2 >Emitted(48, 16) Source(13, 49) + SourceIndex(3)
---
>>> for (var _i = 0; _i < arguments.length; _i++) {
1->^^^^^^^^^
@@ -1171,66 +1195,88 @@ sourceFile:../../../second/second_part1.ts
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)
1->Emitted(49, 10) Source(13, 35) + SourceIndex(3)
2 >Emitted(49, 20) Source(13, 49) + SourceIndex(3)
3 >Emitted(49, 22) Source(13, 35) + SourceIndex(3)
4 >Emitted(49, 43) Source(13, 49) + SourceIndex(3)
5 >Emitted(49, 45) Source(13, 35) + SourceIndex(3)
6 >Emitted(49, 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 >Emitted(50, 9) Source(13, 35) + SourceIndex(3)
2 >Emitted(50, 31) Source(13, 49) + SourceIndex(3)
---
>>> }
>>>}
1 >
2 >^
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >) {
2 >}
1 >Emitted(51, 1) Source(13, 53) + SourceIndex(3)
2 >Emitted(51, 2) Source(13, 54) + SourceIndex(3)
1 >Emitted(52, 1) Source(13, 53) + SourceIndex(3)
2 >Emitted(52, 2) Source(13, 54) + SourceIndex(3)
---
>>>secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30]));
>>>var secondsecond_part1_ar = [20, 30];
1->
2 >^^^^
3 > ^^^^^^^^^^^^^^^^^^^^^
4 > ^^^
5 > ^
6 > ^^
7 > ^^
8 > ^^
9 > ^
10> ^
11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1->
>
2 >const
3 > secondsecond_part1_ar
4 > =
5 > [
6 > 20
7 > ,
8 > 30
9 > ]
10> ;
1->Emitted(53, 1) Source(14, 1) + SourceIndex(3)
2 >Emitted(53, 5) Source(14, 7) + SourceIndex(3)
3 >Emitted(53, 26) Source(14, 28) + SourceIndex(3)
4 >Emitted(53, 29) Source(14, 31) + SourceIndex(3)
5 >Emitted(53, 30) Source(14, 32) + SourceIndex(3)
6 >Emitted(53, 32) Source(14, 34) + SourceIndex(3)
7 >Emitted(53, 34) Source(14, 36) + SourceIndex(3)
8 >Emitted(53, 36) Source(14, 38) + SourceIndex(3)
9 >Emitted(53, 37) Source(14, 39) + SourceIndex(3)
10>Emitted(53, 38) Source(14, 40) + SourceIndex(3)
---
>>>secondsecond_part1Spread.apply(void 0, __spreadArray([10], __read(secondsecond_part1_ar)));
1->
2 >^^^^^^^^^^^^^^^^^^^^^^^^
3 > ^^^^^^^^^^^^^^^^^^^^^^^^
4 > ^
5 > ^^
6 > ^^
7 > ^^
8 > ^^
9 > ^^
10> ^
11> ^^^
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4 > ^^
5 > ^^^^^^^^^^
6 > ^^^^^^^^^^^^^^^^^^^^^
7 > ^^^^
1->
>
2 >secondsecond_part1Spread
3 > (...
4 > [
5 > 10
6 > ,
7 > 20
8 > ,
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)
3 > (
4 > 10
5 > , ...
6 > secondsecond_part1_ar
7 > );
1->Emitted(54, 1) Source(15, 1) + SourceIndex(3)
2 >Emitted(54, 25) Source(15, 25) + SourceIndex(3)
3 >Emitted(54, 55) Source(15, 26) + SourceIndex(3)
4 >Emitted(54, 57) Source(15, 28) + SourceIndex(3)
5 >Emitted(54, 67) Source(15, 33) + SourceIndex(3)
6 >Emitted(54, 88) Source(15, 54) + SourceIndex(3)
7 >Emitted(54, 92) Source(15, 56) + SourceIndex(3)
---
-------------------------------------------------------------------
emittedFile:/src/third/thirdjs/output/third-output.js
@@ -1240,13 +1286,13 @@ sourceFile:../../../second/second_part2.ts
1 >
2 >^^^^^^^^^^^^^^^^^^^->
1 >
1 >Emitted(53, 1) Source(1, 1) + SourceIndex(4)
1 >Emitted(55, 1) Source(1, 1) + SourceIndex(4)
---
>>> function C() {
1->^^^^
2 > ^^->
1->
1->Emitted(54, 5) Source(1, 1) + SourceIndex(4)
1->Emitted(56, 5) Source(1, 1) + SourceIndex(4)
---
>>> }
1->^^^^
@@ -1258,8 +1304,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(57, 5) Source(5, 1) + SourceIndex(4)
2 >Emitted(57, 6) Source(5, 2) + SourceIndex(4)
---
>>> C.prototype.doSomething = function () {
1->^^^^
@@ -1269,9 +1315,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(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)
---
>>> console.log("something got done");
1->^^^^^^^^
@@ -1291,14 +1337,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(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 >^^^^
@@ -1307,8 +1353,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(60, 5) Source(4, 5) + SourceIndex(4)
2 >Emitted(60, 6) Source(4, 6) + SourceIndex(4)
---
>>> return C;
1->^^^^
@@ -1316,8 +1362,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(61, 5) Source(5, 1) + SourceIndex(4)
2 >Emitted(61, 13) Source(5, 2) + SourceIndex(4)
---
>>>}());
1 >
@@ -1333,10 +1379,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(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)
---
-------------------------------------------------------------------
emittedFile:/src/third/thirdjs/output/third-output.js
@@ -1360,14 +1406,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(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->
@@ -1384,12 +1430,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(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->
@@ -1400,9 +1446,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(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->^^^^
@@ -1456,31 +1502,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(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 >
@@ -1489,8 +1535,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(67, 1) Source(5, 1) + SourceIndex(5)
2 >Emitted(67, 2) Source(5, 2) + SourceIndex(5)
---
>>>//# sourceMappingURL=third-output.js.map
@@ -1511,45 +1557,45 @@ sourceFile:../../third_part1.ts
},
{
"pos": 506,
"end": 676,
"end": 697,
"kind": "emitHelpers",
"data": "typescript:spread"
"data": "typescript:spreadArray"
},
{
"pos": 678,
"end": 1178,
"pos": 699,
"end": 1199,
"kind": "emitHelpers",
"data": "typescript:rest"
},
{
"pos": 1180,
"end": 1330,
"pos": 1201,
"end": 1351,
"kind": "prepend",
"data": "../../../first/bin/first-output.js",
"texts": [
{
"pos": 1180,
"end": 1330,
"pos": 1201,
"end": 1351,
"kind": "text"
}
]
},
{
"pos": 1330,
"end": 1831,
"pos": 1351,
"end": 1919,
"kind": "prepend",
"data": "../../../2/second-output.js",
"texts": [
{
"pos": 1330,
"end": 1831,
"pos": 1351,
"end": 1919,
"kind": "text"
}
]
},
{
"pos": 1831,
"end": 1984,
"pos": 1919,
"end": 2072,
"kind": "text"
}
],
@@ -1576,20 +1622,20 @@ sourceFile:../../third_part1.ts
},
{
"pos": 208,
"end": 374,
"end": 422,
"kind": "prepend",
"data": "../../../2/second-output.d.ts",
"texts": [
{
"pos": 208,
"end": 374,
"end": 422,
"kind": "text"
}
]
},
{
"pos": 374,
"end": 444,
"pos": 422,
"end": 492,
"kind": "text"
}
]
@@ -1620,13 +1666,14 @@ var __read = (this && this.__read) || function (o, n) {
return ar;
};
----------------------------------------------------------------------
emitHelpers: (506-676):: typescript:spread
var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
emitHelpers: (506-697):: typescript:spreadArray
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
----------------------------------------------------------------------
emitHelpers: (678-1178):: typescript:rest
emitHelpers: (699-1199):: typescript:rest
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -1639,9 +1686,9 @@ var __rest = (this && this.__rest) || function (s, e) {
return t;
};
----------------------------------------------------------------------
prepend: (1180-1330):: ../../../first/bin/first-output.js texts:: 1
prepend: (1201-1351):: ../../../first/bin/first-output.js texts:: 1
>>--------------------------------------------------------------------
text: (1180-1330)
text: (1201-1351)
var s = "Hello, world";
console.log(s);
function forfirstfirst_PART1Rest() { }
@@ -1651,9 +1698,9 @@ function f() {
}
----------------------------------------------------------------------
prepend: (1330-1831):: ../../../2/second-output.js texts:: 1
prepend: (1351-1919):: ../../../2/second-output.js texts:: 1
>>--------------------------------------------------------------------
text: (1330-1831)
text: (1351-1919)
var N;
(function (N) {
function f() {
@@ -1667,7 +1714,8 @@ function secondsecond_part1Spread() {
b[_i] = arguments[_i];
}
}
secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30]));
var secondsecond_part1_ar = [20, 30];
secondsecond_part1Spread.apply(void 0, __spreadArray([10], __read(secondsecond_part1_ar)));
var C = (function () {
function C() {
}
@@ -1678,7 +1726,7 @@ var C = (function () {
}());
----------------------------------------------------------------------
text: (1831-1984)
text: (1919-2072)
var c = new C();
c.doSomething();
function forthirdthird_part1Rest() {
@@ -1703,20 +1751,21 @@ declare function forfirstfirst_PART1Rest(): void;
declare function f(): string;
----------------------------------------------------------------------
prepend: (208-374):: ../../../2/second-output.d.ts texts:: 1
prepend: (208-422):: ../../../2/second-output.d.ts texts:: 1
>>--------------------------------------------------------------------
text: (208-374)
text: (208-422)
declare namespace N {
}
declare namespace N {
}
declare function secondsecond_part1Spread(...b: number[]): void;
declare const secondsecond_part1_ar: number[];
declare class C {
doSomething(): void;
}
----------------------------------------------------------------------
text: (374-444)
text: (422-492)
declare var c: C;
declare function forthirdthird_part1Rest(): void;
+6 -8
View File
@@ -41,12 +41,10 @@ var whitespace3 = <div>
//// [file.jsx]
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
var p;
var selfClosed1 = <div />;
@@ -67,10 +65,10 @@ var SomeClass = /** @class */ (function () {
SomeClass.prototype.f = function () {
var _this = this;
var rewrites1 = <div>{function () { return _this; }}</div>;
var rewrites2 = <div>{__spreadArrays([p], p, [p])}</div>;
var rewrites2 = <div>{__spreadArray(__spreadArray([p], p), [p])}</div>;
var rewrites3 = <div>{{ p: p }}</div>;
var rewrites4 = <div a={function () { return _this; }}></div>;
var rewrites5 = <div a={__spreadArrays([p], p, [p])}></div>;
var rewrites5 = <div a={__spreadArray(__spreadArray([p], p), [p])}></div>;
var rewrites6 = <div a={{ p: p }}></div>;
};
return SomeClass;
+6 -8
View File
@@ -42,12 +42,10 @@ var whitespace3 = <div>
//// [file.js]
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
var p;
var selfClosed1 = React.createElement("div", null);
@@ -68,10 +66,10 @@ var SomeClass = /** @class */ (function () {
SomeClass.prototype.f = function () {
var _this = this;
var rewrites1 = React.createElement("div", null, function () { return _this; });
var rewrites2 = React.createElement("div", null, __spreadArrays([p], p, [p]));
var rewrites2 = React.createElement("div", null, __spreadArray(__spreadArray([p], p), [p]));
var rewrites3 = React.createElement("div", null, { p: p });
var rewrites4 = React.createElement("div", { a: function () { return _this; } });
var rewrites5 = React.createElement("div", { a: __spreadArrays([p], p, [p]) });
var rewrites5 = React.createElement("div", { a: __spreadArray(__spreadArray([p], p), [p]) });
var rewrites6 = React.createElement("div", { a: { p: p } });
};
return SomeClass;
+25 -27
View File
@@ -405,41 +405,39 @@ type U3 = [...[string, number], boolean];
//// [variadicTuples1.js]
"use strict";
// Variadics in tuple types
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
// Variadics in array literals
function tup2(t, u) {
return __spreadArrays([1], t, [2], u, [3]);
return __spreadArray(__spreadArray(__spreadArray(__spreadArray([1], t), [2]), u), [3]);
}
var t2 = tup2(['hello'], [10, true]);
function concat(t, u) {
return __spreadArrays(t, u);
return __spreadArray(__spreadArray([], t), u);
}
var tc1 = concat([], []);
var tc2 = concat(['hello'], [42]);
var tc3 = concat([1, 2, 3], sa);
var tc4 = concat(sa, [1, 2, 3]); // Ideally would be [...string[], number, number, number]
function concat2(t, u) {
return __spreadArrays(t, u); // (T[number] | U[number])[]
return __spreadArray(__spreadArray([], t), u); // (T[number] | U[number])[]
}
var tc5 = concat2([1, 2, 3], [4, 5, 6]); // (1 | 2 | 3 | 4 | 5 | 6)[]
function foo2(t1, t2, a1) {
foo1(1, 'abc', true, 42, 43, 44);
foo1.apply(void 0, __spreadArrays(t1, [true, 42, 43, 44]));
foo1.apply(void 0, __spreadArrays(t1, t2, [42, 43, 44]));
foo1.apply(void 0, __spreadArrays(t1, t2, a1));
foo1.apply(void 0, __spreadArray(__spreadArray([], t1), [true, 42, 43, 44]));
foo1.apply(void 0, __spreadArray(__spreadArray(__spreadArray([], t1), t2), [42, 43, 44]));
foo1.apply(void 0, __spreadArray(__spreadArray(__spreadArray([], t1), t2), a1));
foo1.apply(void 0, t1); // Error
foo1.apply(void 0, __spreadArrays(t1, [45])); // Error
foo1.apply(void 0, __spreadArray(__spreadArray([], t1), [45])); // Error
}
function foo4(u) {
foo3(1, 2);
foo3(1, 'hello', true, 2);
foo3.apply(void 0, __spreadArrays([1], u, ['hi', 2]));
foo3.apply(void 0, __spreadArray(__spreadArray([1], u), ['hi', 2]));
foo3(1);
}
ft1(['hello', 42]); // (string | number)[]
@@ -473,17 +471,17 @@ function f3(t) {
var tm1 = fm1([['abc'], [42], [true], ['def']]); // [boolean, string]
function gx1(u, v) {
fx1('abc'); // []
fx1.apply(void 0, __spreadArrays(['abc'], u)); // U
fx1.apply(void 0, __spreadArrays(['abc'], v)); // [...V]
fx1.apply(void 0, __spreadArrays(['abc'], u)); // U
fx1.apply(void 0, __spreadArrays(['abc'], v)); // Error
fx1.apply(void 0, __spreadArray(['abc'], u)); // U
fx1.apply(void 0, __spreadArray(['abc'], v)); // [...V]
fx1.apply(void 0, __spreadArray(['abc'], u)); // U
fx1.apply(void 0, __spreadArray(['abc'], v)); // Error
}
function gx2(u, v) {
fx2('abc'); // []
fx2.apply(void 0, __spreadArrays(['abc'], u)); // U
fx2.apply(void 0, __spreadArrays(['abc'], v)); // [...V]
fx2.apply(void 0, __spreadArrays(['abc'], u)); // U
fx2.apply(void 0, __spreadArrays(['abc'], v)); // V
fx2.apply(void 0, __spreadArray(['abc'], u)); // U
fx2.apply(void 0, __spreadArray(['abc'], v)); // [...V]
fx2.apply(void 0, __spreadArray(['abc'], u)); // U
fx2.apply(void 0, __spreadArray(['abc'], v)); // V
}
// Relations involving variadic tuple types
function f10(x, y, z) {
@@ -550,7 +548,7 @@ function curry(f) {
for (var _i = 0; _i < arguments.length; _i++) {
b[_i] = arguments[_i];
}
return f.apply(void 0, __spreadArrays(a, b));
return f.apply(void 0, __spreadArray(__spreadArray([], a), b));
};
}
var fn1 = function (a, b, c, d) { return 0; };
@@ -579,10 +577,10 @@ var fn3 = function () {
};
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
var c22 = curry.apply(void 0, __spreadArray([fn3], sa)); // (...args: string[]) => number
// No inference to [...T, ...U] when there is no implied arity
function curry2(f, t, u) {
return f.apply(void 0, __spreadArrays(t, u));
return f.apply(void 0, __spreadArray(__spreadArray([], t), u));
}
curry2(fn10, ['hello', 42], [true]);
curry2(fn10, ['hello'], [42, true]);
@@ -591,7 +589,7 @@ ft([1, 2], [1, 2, 3]);
ft(['a', 'b'], ['c', 'd']);
ft(['a', 'b'], ['c', 'd', 42]);
call('hello', 32, function (a, b) { return 42; });
call.apply(void 0, __spreadArrays(sa, [function () {
call.apply(void 0, __spreadArray(__spreadArray([], sa), [function () {
var x = [];
for (var _i = 0; _i < arguments.length; _i++) {
x[_i] = arguments[_i];
@@ -615,7 +613,7 @@ function callApi(method) {
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
return method.apply(void 0, __spreadArrays(args, [{}]));
return method.apply(void 0, __spreadArray(__spreadArray([], args), [{}]));
};
}
callApi(getUser);
+6 -8
View File
@@ -134,12 +134,10 @@ const e1 = foo('blah1', 'blah2', 1, 2, 3); // Error
//// [variadicTuples2.js]
"use strict";
// Declarations
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
tt1 = [5];
tt1 = ['abc', 5];
@@ -193,14 +191,14 @@ pipe("foo", 123, true, function () {
}
x; // [string, number, boolean]
});
pipe.apply(void 0, __spreadArrays(sa, [function () {
pipe.apply(void 0, __spreadArray(__spreadArray([], sa), [function () {
var x = [];
for (var _i = 0; _i < arguments.length; _i++) {
x[_i] = arguments[_i];
}
x; // string[]
}]));
pipe.apply(void 0, __spreadArrays([1], sa, [2, function () {
pipe.apply(void 0, __spreadArray(__spreadArray([1], sa), [2, function () {
var x = [];
for (var _i = 0; _i < arguments.length; _i++) {
x[_i] = arguments[_i];