mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge pull request #23956 from Kingwl/emit-var-at-top
emit temporary vars at the top of the scope
This commit is contained in:
@@ -951,6 +951,21 @@ namespace ts {
|
||||
return to;
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends a range of value to begin of an array, returning the array.
|
||||
*
|
||||
* @param to The array to which `value` is to be appended. If `to` is `undefined`, a new array
|
||||
* is created if `value` was appended.
|
||||
* @param from The values to append to the array. If `from` is `undefined`, nothing is
|
||||
* appended. If an element of `from` is `undefined`, that element is not appended.
|
||||
*/
|
||||
export function prependRange<T>(to: T[], from: ReadonlyArray<T> | undefined): T[] | undefined {
|
||||
if (from === undefined || from.length === 0) return to;
|
||||
if (to === undefined) return from.slice();
|
||||
to.unshift(...from);
|
||||
return to;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Whether the value was added.
|
||||
*/
|
||||
|
||||
@@ -529,7 +529,7 @@ namespace ts {
|
||||
createVariableStatement(/*modifiers*/ undefined,
|
||||
createVariableDeclarationList(taggedTemplateStringDeclarations)));
|
||||
}
|
||||
addRange(statements, endLexicalEnvironment());
|
||||
prependRange(statements, endLexicalEnvironment());
|
||||
exitSubtree(ancestorFacts, HierarchyFacts.None, HierarchyFacts.None);
|
||||
return updateSourceFileNode(
|
||||
node,
|
||||
@@ -836,7 +836,7 @@ namespace ts {
|
||||
setEmitFlags(statement, EmitFlags.NoComments | EmitFlags.NoTokenSourceMaps);
|
||||
statements.push(statement);
|
||||
|
||||
addRange(statements, endLexicalEnvironment());
|
||||
prependRange(statements, endLexicalEnvironment());
|
||||
|
||||
const block = createBlock(setTextRange(createNodeArray(statements), /*location*/ node.members), /*multiLine*/ true);
|
||||
setEmitFlags(block, EmitFlags.NoComments);
|
||||
@@ -979,7 +979,7 @@ namespace ts {
|
||||
);
|
||||
}
|
||||
|
||||
addRange(statements, endLexicalEnvironment());
|
||||
prependRange(statements, endLexicalEnvironment());
|
||||
|
||||
if (constructor) {
|
||||
prependCaptureNewTargetIfNeeded(statements, constructor, /*copyOnWrite*/ false);
|
||||
@@ -1894,7 +1894,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
const lexicalEnvironment = context.endLexicalEnvironment();
|
||||
addRange(statements, lexicalEnvironment);
|
||||
prependRange(statements, lexicalEnvironment);
|
||||
|
||||
prependCaptureNewTargetIfNeeded(statements, node, /*copyOnWrite*/ false);
|
||||
|
||||
@@ -2712,7 +2712,7 @@ namespace ts {
|
||||
if (loopOutParameters.length) {
|
||||
copyOutParameters(loopOutParameters, CopyDirection.ToOutParameter, statements);
|
||||
}
|
||||
addRange(statements, lexicalEnvironment);
|
||||
prependRange(statements, lexicalEnvironment);
|
||||
loopBody = createBlock(statements, /*multiline*/ true);
|
||||
}
|
||||
|
||||
@@ -3309,10 +3309,12 @@ namespace ts {
|
||||
// expression, but we will restore them later to preserve comments and source maps.
|
||||
const body = cast(cast(skipOuterExpressions(node.expression), isArrowFunction).body, isBlock);
|
||||
|
||||
// The class statements are the statements generated by visiting the first statement of the
|
||||
// The class statements are the statements generated by visiting the first statement with initializer of the
|
||||
// body (1), while all other statements are added to remainingStatements (2)
|
||||
const classStatements = visitNodes(body.statements, visitor, isStatement, 0, 1);
|
||||
const remainingStatements = visitNodes(body.statements, visitor, isStatement, 1, body.statements.length - 1);
|
||||
const isVariableStatementWithInitializer = (stmt: Statement) => isVariableStatement(stmt) && !!firstOrUndefined(stmt.declarationList.declarations).initializer;
|
||||
const bodyStatements = visitNodes(body.statements, visitor, isStatement);
|
||||
const classStatements = filter(bodyStatements, isVariableStatementWithInitializer);
|
||||
const remainingStatements = filter(bodyStatements, stmt => !isVariableStatementWithInitializer(stmt));
|
||||
const varStatement = cast(firstOrUndefined(classStatements), isVariableStatement);
|
||||
|
||||
// We know there is only one variable declaration here as we verified this in an
|
||||
@@ -3324,6 +3326,7 @@ namespace ts {
|
||||
// we see as an assignment, for example:
|
||||
//
|
||||
// (function () {
|
||||
// var C_1;
|
||||
// var C = C_1 = (function () {
|
||||
// function C() {
|
||||
// }
|
||||
@@ -3332,7 +3335,6 @@ namespace ts {
|
||||
// }());
|
||||
// C = C_1 = __decorate([dec], C);
|
||||
// return C;
|
||||
// var C_1;
|
||||
// }())
|
||||
//
|
||||
const aliasAssignment = tryCast(initializer, isAssignmentExpression);
|
||||
|
||||
@@ -412,7 +412,7 @@ namespace ts {
|
||||
)
|
||||
);
|
||||
|
||||
addRange(statements, endLexicalEnvironment());
|
||||
prependRange(statements, endLexicalEnvironment());
|
||||
|
||||
const block = createBlock(statements, /*multiLine*/ true);
|
||||
setTextRange(block, node.body);
|
||||
@@ -443,7 +443,7 @@ namespace ts {
|
||||
const declarations = endLexicalEnvironment();
|
||||
if (some(declarations)) {
|
||||
const block = convertToFunctionBody(expression);
|
||||
result = updateBlock(block, setTextRange(createNodeArray(concatenate(block.statements, declarations)), block.statements));
|
||||
result = updateBlock(block, setTextRange(createNodeArray(concatenate(declarations, block.statements)), block.statements));
|
||||
}
|
||||
else {
|
||||
result = expression;
|
||||
|
||||
@@ -663,7 +663,7 @@ namespace ts {
|
||||
)
|
||||
);
|
||||
|
||||
addRange(statements, endLexicalEnvironment());
|
||||
prependRange(statements, endLexicalEnvironment());
|
||||
const block = updateBlock(node.body, statements);
|
||||
|
||||
// Minor optimization, emit `_super` helper to capture `super` access in an arrow.
|
||||
@@ -692,11 +692,11 @@ namespace ts {
|
||||
statementOffset = addPrologue(statements, body.statements, /*ensureUseStrict*/ false, visitor);
|
||||
}
|
||||
addRange(statements, appendObjectRestAssignmentsIfNeeded(/*statements*/ undefined, node));
|
||||
const trailingStatements = endLexicalEnvironment();
|
||||
if (statementOffset > 0 || some(statements) || some(trailingStatements)) {
|
||||
const leadingStatements = endLexicalEnvironment();
|
||||
if (statementOffset > 0 || some(statements) || some(leadingStatements)) {
|
||||
const block = convertToFunctionBody(body, /*multiLine*/ true);
|
||||
prependRange(statements, leadingStatements);
|
||||
addRange(statements, block.statements.slice(statementOffset));
|
||||
addRange(statements, trailingStatements);
|
||||
return updateBlock(block, setTextRange(createNodeArray(statements), block.statements));
|
||||
}
|
||||
return body;
|
||||
|
||||
@@ -586,7 +586,7 @@ namespace ts {
|
||||
transformAndEmitStatements(body.statements, statementOffset);
|
||||
|
||||
const buildResult = build();
|
||||
addRange(statements, endLexicalEnvironment());
|
||||
prependRange(statements, endLexicalEnvironment());
|
||||
statements.push(createReturn(buildResult));
|
||||
|
||||
// Restore previous generator state
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace ts {
|
||||
append(statements, visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, isStatement));
|
||||
addRange(statements, visitNodes(node.statements, sourceElementVisitor, isStatement, statementOffset));
|
||||
addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false);
|
||||
addRange(statements, endLexicalEnvironment());
|
||||
prependRange(statements, endLexicalEnvironment());
|
||||
|
||||
const updated = updateSourceFileNode(node, setTextRange(createNodeArray(statements), node.statements));
|
||||
if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) {
|
||||
@@ -426,7 +426,7 @@ namespace ts {
|
||||
|
||||
// End the lexical environment for the module body
|
||||
// and merge any new lexical declarations.
|
||||
addRange(statements, endLexicalEnvironment());
|
||||
prependRange(statements, endLexicalEnvironment());
|
||||
|
||||
const body = createBlock(statements, /*multiLine*/ true);
|
||||
if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) {
|
||||
|
||||
@@ -257,7 +257,7 @@ namespace ts {
|
||||
// We emit hoisted variables early to align roughly with our previous emit output.
|
||||
// Two key differences in this approach are:
|
||||
// - Temporary variables will appear at the top rather than at the bottom of the file
|
||||
addRange(statements, endLexicalEnvironment());
|
||||
prependRange(statements, endLexicalEnvironment());
|
||||
|
||||
const exportStarFunction = addExportStarIfNeeded(statements);
|
||||
const moduleObject = createObjectLiteral([
|
||||
|
||||
@@ -669,7 +669,7 @@ namespace ts {
|
||||
setEmitFlags(statement, EmitFlags.NoComments | EmitFlags.NoTokenSourceMaps);
|
||||
statements.push(statement);
|
||||
|
||||
addRange(statements, context.endLexicalEnvironment());
|
||||
prependRange(statements, context.endLexicalEnvironment());
|
||||
|
||||
const iife = createImmediatelyInvokedArrowFunction(statements);
|
||||
setEmitFlags(iife, EmitFlags.TypeScriptClassWrapper);
|
||||
@@ -2685,8 +2685,9 @@ namespace ts {
|
||||
|
||||
const statements: Statement[] = [];
|
||||
startLexicalEnvironment();
|
||||
addRange(statements, map(node.members, transformEnumMember));
|
||||
addRange(statements, endLexicalEnvironment());
|
||||
const members = map(node.members, transformEnumMember);
|
||||
prependRange(statements, endLexicalEnvironment());
|
||||
addRange(statements, members);
|
||||
|
||||
currentNamespaceContainerName = savedCurrentNamespaceLocalName;
|
||||
return createBlock(
|
||||
@@ -3000,7 +3001,7 @@ namespace ts {
|
||||
statementsLocation = moveRangePos(moduleBlock.statements, -1);
|
||||
}
|
||||
|
||||
addRange(statements, endLexicalEnvironment());
|
||||
prependRange(statements, endLexicalEnvironment());
|
||||
currentNamespaceContainerName = savedCurrentNamespaceContainerName;
|
||||
currentNamespace = savedCurrentNamespace;
|
||||
currentScopeFirstDeclarationsOfName = savedCurrentScopeFirstDeclarationsOfName;
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace ts {
|
||||
statements = setTextRange(createNodeArray([createStatement(createLiteral("use strict")), ...statements]), statements);
|
||||
}
|
||||
const declarations = context.endLexicalEnvironment();
|
||||
return setTextRange(createNodeArray(concatenate(statements, declarations)), statements);
|
||||
return setTextRange(createNodeArray(concatenate(declarations, statements)), statements);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1468,8 +1468,8 @@ namespace ts {
|
||||
}
|
||||
|
||||
return isNodeArray(statements)
|
||||
? setTextRange(createNodeArray(concatenate(statements, declarations)), statements)
|
||||
: addRange(statements, declarations);
|
||||
? setTextRange(createNodeArray(concatenate(declarations, statements)), statements)
|
||||
: prependRange(statements, declarations);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,6 +7,7 @@ for ([a = 1, b = ""] of tuple) {
|
||||
}
|
||||
|
||||
//// [ES5For-of30.js]
|
||||
var _a, _b, _c;
|
||||
var a, b;
|
||||
var tuple = [2, "3"];
|
||||
for (var _i = 0, tuple_1 = tuple; _i < tuple_1.length; _i++) {
|
||||
@@ -14,4 +15,3 @@ for (var _i = 0, tuple_1 = tuple; _i < tuple_1.length; _i++) {
|
||||
a;
|
||||
b;
|
||||
}
|
||||
var _a, _b, _c;
|
||||
|
||||
@@ -7,10 +7,10 @@ for ({ a: b = 1, b: a = ""} of []) {
|
||||
}
|
||||
|
||||
//// [ES5For-of31.js]
|
||||
var _a, _b, _c;
|
||||
var a, b;
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
_b = _a[_i], _c = _b.a, b = _c === void 0 ? 1 : _c, _d = _b.b, a = _d === void 0 ? "" : _d;
|
||||
for (var _i = 0, _d = []; _i < _d.length; _i++) {
|
||||
_a = _d[_i], _b = _a.a, b = _b === void 0 ? 1 : _b, _c = _a.b, a = _c === void 0 ? "" : _c;
|
||||
a;
|
||||
b;
|
||||
}
|
||||
var _b, _c, _d;
|
||||
|
||||
@@ -14,18 +14,18 @@ var __values = (this && this.__values) || function (o) {
|
||||
}
|
||||
};
|
||||
};
|
||||
var e_1, _a;
|
||||
try {
|
||||
for (var _a = __values(['a', 'b', 'c']), _b = _a.next(); !_b.done; _b = _a.next()) {
|
||||
var v = _b.value;
|
||||
for (var _b = __values(['a', 'b', 'c']), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
var v = _c.value;
|
||||
console.log(v);
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_b && !_b.done && (_c = _a["return"])) _c.call(_a);
|
||||
if (_c && !_c.done && (_a = _b["return"])) _a.call(_b);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
var e_1, _c;
|
||||
//# sourceMappingURL=ES5For-of33.js.map
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [ES5For-of33.js.map]
|
||||
{"version":3,"file":"ES5For-of33.js","sourceRoot":"","sources":["ES5For-of33.ts"],"names":[],"mappings":";;;;;;;;;;;IAAA,KAAc,IAAA,KAAA,SAAA,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA,gBAAA,4BAAE;QAA1B,IAAI,CAAC,WAAA;QACN,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;KAClB"}
|
||||
{"version":3,"file":"ES5For-of33.js","sourceRoot":"","sources":["ES5For-of33.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,KAAc,IAAA,KAAA,SAAA,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA,gBAAA,4BAAE;QAA1B,IAAI,CAAC,WAAA;QACN,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;KAClB"}
|
||||
@@ -18,8 +18,9 @@ sourceFile:ES5For-of33.ts
|
||||
>>> }
|
||||
>>> };
|
||||
>>>};
|
||||
>>>var e_1, _a;
|
||||
>>>try {
|
||||
>>> for (var _a = __values(['a', 'b', 'c']), _b = _a.next(); !_b.done; _b = _a.next()) {
|
||||
>>> for (var _b = __values(['a', 'b', 'c']), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
1 >^^^^
|
||||
2 > ^^^^^
|
||||
3 > ^^^^
|
||||
@@ -50,23 +51,23 @@ sourceFile:ES5For-of33.ts
|
||||
13>
|
||||
14>
|
||||
15> )
|
||||
1 >Emitted(12, 5) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(12, 10) Source(1, 15) + SourceIndex(0)
|
||||
3 >Emitted(12, 14) Source(1, 15) + SourceIndex(0)
|
||||
4 >Emitted(12, 19) Source(1, 15) + SourceIndex(0)
|
||||
5 >Emitted(12, 28) Source(1, 15) + SourceIndex(0)
|
||||
6 >Emitted(12, 29) Source(1, 16) + SourceIndex(0)
|
||||
7 >Emitted(12, 32) Source(1, 19) + SourceIndex(0)
|
||||
8 >Emitted(12, 34) Source(1, 21) + SourceIndex(0)
|
||||
9 >Emitted(12, 37) Source(1, 24) + SourceIndex(0)
|
||||
10>Emitted(12, 39) Source(1, 26) + SourceIndex(0)
|
||||
11>Emitted(12, 42) Source(1, 29) + SourceIndex(0)
|
||||
12>Emitted(12, 43) Source(1, 30) + SourceIndex(0)
|
||||
13>Emitted(12, 44) Source(1, 30) + SourceIndex(0)
|
||||
14>Emitted(12, 60) Source(1, 30) + SourceIndex(0)
|
||||
15>Emitted(12, 88) Source(1, 32) + SourceIndex(0)
|
||||
1 >Emitted(13, 5) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(13, 10) Source(1, 15) + SourceIndex(0)
|
||||
3 >Emitted(13, 14) Source(1, 15) + SourceIndex(0)
|
||||
4 >Emitted(13, 19) Source(1, 15) + SourceIndex(0)
|
||||
5 >Emitted(13, 28) Source(1, 15) + SourceIndex(0)
|
||||
6 >Emitted(13, 29) Source(1, 16) + SourceIndex(0)
|
||||
7 >Emitted(13, 32) Source(1, 19) + SourceIndex(0)
|
||||
8 >Emitted(13, 34) Source(1, 21) + SourceIndex(0)
|
||||
9 >Emitted(13, 37) Source(1, 24) + SourceIndex(0)
|
||||
10>Emitted(13, 39) Source(1, 26) + SourceIndex(0)
|
||||
11>Emitted(13, 42) Source(1, 29) + SourceIndex(0)
|
||||
12>Emitted(13, 43) Source(1, 30) + SourceIndex(0)
|
||||
13>Emitted(13, 44) Source(1, 30) + SourceIndex(0)
|
||||
14>Emitted(13, 60) Source(1, 30) + SourceIndex(0)
|
||||
15>Emitted(13, 88) Source(1, 32) + SourceIndex(0)
|
||||
---
|
||||
>>> var v = _b.value;
|
||||
>>> var v = _c.value;
|
||||
1 >^^^^^^^^
|
||||
2 > ^^^^
|
||||
3 > ^
|
||||
@@ -75,10 +76,10 @@ sourceFile:ES5For-of33.ts
|
||||
2 > var
|
||||
3 > v
|
||||
4 >
|
||||
1 >Emitted(13, 9) Source(1, 6) + SourceIndex(0)
|
||||
2 >Emitted(13, 13) Source(1, 10) + SourceIndex(0)
|
||||
3 >Emitted(13, 14) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(13, 25) Source(1, 11) + SourceIndex(0)
|
||||
1 >Emitted(14, 9) Source(1, 6) + SourceIndex(0)
|
||||
2 >Emitted(14, 13) Source(1, 10) + SourceIndex(0)
|
||||
3 >Emitted(14, 14) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(14, 25) Source(1, 11) + SourceIndex(0)
|
||||
---
|
||||
>>> console.log(v);
|
||||
1 >^^^^^^^^
|
||||
@@ -98,28 +99,27 @@ sourceFile:ES5For-of33.ts
|
||||
6 > v
|
||||
7 > )
|
||||
8 > ;
|
||||
1 >Emitted(14, 9) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(14, 16) Source(2, 12) + SourceIndex(0)
|
||||
3 >Emitted(14, 17) Source(2, 13) + SourceIndex(0)
|
||||
4 >Emitted(14, 20) Source(2, 16) + SourceIndex(0)
|
||||
5 >Emitted(14, 21) Source(2, 17) + SourceIndex(0)
|
||||
6 >Emitted(14, 22) Source(2, 18) + SourceIndex(0)
|
||||
7 >Emitted(14, 23) Source(2, 19) + SourceIndex(0)
|
||||
8 >Emitted(14, 24) Source(2, 20) + SourceIndex(0)
|
||||
1 >Emitted(15, 9) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(15, 16) Source(2, 12) + SourceIndex(0)
|
||||
3 >Emitted(15, 17) Source(2, 13) + SourceIndex(0)
|
||||
4 >Emitted(15, 20) Source(2, 16) + SourceIndex(0)
|
||||
5 >Emitted(15, 21) Source(2, 17) + SourceIndex(0)
|
||||
6 >Emitted(15, 22) Source(2, 18) + SourceIndex(0)
|
||||
7 >Emitted(15, 23) Source(2, 19) + SourceIndex(0)
|
||||
8 >Emitted(15, 24) Source(2, 20) + SourceIndex(0)
|
||||
---
|
||||
>>> }
|
||||
1 >^^^^^
|
||||
1 >
|
||||
>}
|
||||
1 >Emitted(15, 6) Source(3, 2) + SourceIndex(0)
|
||||
1 >Emitted(16, 6) Source(3, 2) + SourceIndex(0)
|
||||
---
|
||||
>>>}
|
||||
>>>catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
>>>finally {
|
||||
>>> try {
|
||||
>>> if (_b && !_b.done && (_c = _a["return"])) _c.call(_a);
|
||||
>>> if (_c && !_c.done && (_a = _b["return"])) _a.call(_b);
|
||||
>>> }
|
||||
>>> finally { if (e_1) throw e_1.error; }
|
||||
>>>}
|
||||
>>>var e_1, _c;
|
||||
>>>//# sourceMappingURL=ES5For-of33.js.map
|
||||
@@ -17,21 +17,21 @@ var __values = (this && this.__values) || function (o) {
|
||||
}
|
||||
};
|
||||
};
|
||||
var e_1, _a;
|
||||
function foo() {
|
||||
return { x: 0 };
|
||||
}
|
||||
try {
|
||||
for (var _a = __values(['a', 'b', 'c']), _b = _a.next(); !_b.done; _b = _a.next()) {
|
||||
foo().x = _b.value;
|
||||
for (var _b = __values(['a', 'b', 'c']), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
foo().x = _c.value;
|
||||
var p = foo().x;
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_b && !_b.done && (_c = _a["return"])) _c.call(_a);
|
||||
if (_c && !_c.done && (_a = _b["return"])) _a.call(_b);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
var e_1, _c;
|
||||
//# sourceMappingURL=ES5For-of34.js.map
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [ES5For-of34.js.map]
|
||||
{"version":3,"file":"ES5For-of34.js","sourceRoot":"","sources":["ES5For-of34.ts"],"names":[],"mappings":";;;;;;;;;;AAAA;IACI,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AACpB,CAAC;;IACD,KAAgB,IAAA,KAAA,SAAA,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA,gBAAA,4BAAE;QAA5B,GAAG,EAAE,CAAC,CAAC,WAAA;QACR,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;KACnB"}
|
||||
{"version":3,"file":"ES5For-of34.js","sourceRoot":"","sources":["ES5For-of34.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA;IACI,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AACpB,CAAC;;IACD,KAAgB,IAAA,KAAA,SAAA,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA,gBAAA,4BAAE;QAA5B,GAAG,EAAE,CAAC,CAAC,WAAA;QACR,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;KACnB"}
|
||||
@@ -18,11 +18,12 @@ sourceFile:ES5For-of34.ts
|
||||
>>> }
|
||||
>>> };
|
||||
>>>};
|
||||
>>>var e_1, _a;
|
||||
>>>function foo() {
|
||||
1 >
|
||||
2 >^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
1 >Emitted(11, 1) Source(1, 1) + SourceIndex(0)
|
||||
1 >Emitted(12, 1) Source(1, 1) + SourceIndex(0)
|
||||
---
|
||||
>>> return { x: 0 };
|
||||
1->^^^^
|
||||
@@ -42,14 +43,14 @@ sourceFile:ES5For-of34.ts
|
||||
6 > 0
|
||||
7 > }
|
||||
8 > ;
|
||||
1->Emitted(12, 5) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(12, 12) Source(2, 12) + SourceIndex(0)
|
||||
3 >Emitted(12, 14) Source(2, 14) + SourceIndex(0)
|
||||
4 >Emitted(12, 15) Source(2, 15) + SourceIndex(0)
|
||||
5 >Emitted(12, 17) Source(2, 17) + SourceIndex(0)
|
||||
6 >Emitted(12, 18) Source(2, 18) + SourceIndex(0)
|
||||
7 >Emitted(12, 20) Source(2, 20) + SourceIndex(0)
|
||||
8 >Emitted(12, 21) Source(2, 21) + SourceIndex(0)
|
||||
1->Emitted(13, 5) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(13, 12) Source(2, 12) + SourceIndex(0)
|
||||
3 >Emitted(13, 14) Source(2, 14) + SourceIndex(0)
|
||||
4 >Emitted(13, 15) Source(2, 15) + SourceIndex(0)
|
||||
5 >Emitted(13, 17) Source(2, 17) + SourceIndex(0)
|
||||
6 >Emitted(13, 18) Source(2, 18) + SourceIndex(0)
|
||||
7 >Emitted(13, 20) Source(2, 20) + SourceIndex(0)
|
||||
8 >Emitted(13, 21) Source(2, 21) + SourceIndex(0)
|
||||
---
|
||||
>>>}
|
||||
1 >
|
||||
@@ -58,11 +59,11 @@ sourceFile:ES5For-of34.ts
|
||||
1 >
|
||||
>
|
||||
2 >}
|
||||
1 >Emitted(13, 1) Source(3, 1) + SourceIndex(0)
|
||||
2 >Emitted(13, 2) Source(3, 2) + SourceIndex(0)
|
||||
1 >Emitted(14, 1) Source(3, 1) + SourceIndex(0)
|
||||
2 >Emitted(14, 2) Source(3, 2) + SourceIndex(0)
|
||||
---
|
||||
>>>try {
|
||||
>>> for (var _a = __values(['a', 'b', 'c']), _b = _a.next(); !_b.done; _b = _a.next()) {
|
||||
>>> for (var _b = __values(['a', 'b', 'c']), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
1->^^^^
|
||||
2 > ^^^^^
|
||||
3 > ^^^^
|
||||
@@ -94,23 +95,23 @@ sourceFile:ES5For-of34.ts
|
||||
13>
|
||||
14>
|
||||
15> )
|
||||
1->Emitted(15, 5) Source(4, 1) + SourceIndex(0)
|
||||
2 >Emitted(15, 10) Source(4, 17) + SourceIndex(0)
|
||||
3 >Emitted(15, 14) Source(4, 17) + SourceIndex(0)
|
||||
4 >Emitted(15, 19) Source(4, 17) + SourceIndex(0)
|
||||
5 >Emitted(15, 28) Source(4, 17) + SourceIndex(0)
|
||||
6 >Emitted(15, 29) Source(4, 18) + SourceIndex(0)
|
||||
7 >Emitted(15, 32) Source(4, 21) + SourceIndex(0)
|
||||
8 >Emitted(15, 34) Source(4, 23) + SourceIndex(0)
|
||||
9 >Emitted(15, 37) Source(4, 26) + SourceIndex(0)
|
||||
10>Emitted(15, 39) Source(4, 28) + SourceIndex(0)
|
||||
11>Emitted(15, 42) Source(4, 31) + SourceIndex(0)
|
||||
12>Emitted(15, 43) Source(4, 32) + SourceIndex(0)
|
||||
13>Emitted(15, 44) Source(4, 32) + SourceIndex(0)
|
||||
14>Emitted(15, 60) Source(4, 32) + SourceIndex(0)
|
||||
15>Emitted(15, 88) Source(4, 34) + SourceIndex(0)
|
||||
1->Emitted(16, 5) Source(4, 1) + SourceIndex(0)
|
||||
2 >Emitted(16, 10) Source(4, 17) + SourceIndex(0)
|
||||
3 >Emitted(16, 14) Source(4, 17) + SourceIndex(0)
|
||||
4 >Emitted(16, 19) Source(4, 17) + SourceIndex(0)
|
||||
5 >Emitted(16, 28) Source(4, 17) + SourceIndex(0)
|
||||
6 >Emitted(16, 29) Source(4, 18) + SourceIndex(0)
|
||||
7 >Emitted(16, 32) Source(4, 21) + SourceIndex(0)
|
||||
8 >Emitted(16, 34) Source(4, 23) + SourceIndex(0)
|
||||
9 >Emitted(16, 37) Source(4, 26) + SourceIndex(0)
|
||||
10>Emitted(16, 39) Source(4, 28) + SourceIndex(0)
|
||||
11>Emitted(16, 42) Source(4, 31) + SourceIndex(0)
|
||||
12>Emitted(16, 43) Source(4, 32) + SourceIndex(0)
|
||||
13>Emitted(16, 44) Source(4, 32) + SourceIndex(0)
|
||||
14>Emitted(16, 60) Source(4, 32) + SourceIndex(0)
|
||||
15>Emitted(16, 88) Source(4, 34) + SourceIndex(0)
|
||||
---
|
||||
>>> foo().x = _b.value;
|
||||
>>> foo().x = _c.value;
|
||||
1 >^^^^^^^^
|
||||
2 > ^^^
|
||||
3 > ^^
|
||||
@@ -123,12 +124,12 @@ sourceFile:ES5For-of34.ts
|
||||
4 > .
|
||||
5 > x
|
||||
6 >
|
||||
1 >Emitted(16, 9) Source(4, 6) + SourceIndex(0)
|
||||
2 >Emitted(16, 12) Source(4, 9) + SourceIndex(0)
|
||||
3 >Emitted(16, 14) Source(4, 11) + SourceIndex(0)
|
||||
4 >Emitted(16, 15) Source(4, 12) + SourceIndex(0)
|
||||
5 >Emitted(16, 16) Source(4, 13) + SourceIndex(0)
|
||||
6 >Emitted(16, 27) Source(4, 13) + SourceIndex(0)
|
||||
1 >Emitted(17, 9) Source(4, 6) + SourceIndex(0)
|
||||
2 >Emitted(17, 12) Source(4, 9) + SourceIndex(0)
|
||||
3 >Emitted(17, 14) Source(4, 11) + SourceIndex(0)
|
||||
4 >Emitted(17, 15) Source(4, 12) + SourceIndex(0)
|
||||
5 >Emitted(17, 16) Source(4, 13) + SourceIndex(0)
|
||||
6 >Emitted(17, 27) Source(4, 13) + SourceIndex(0)
|
||||
---
|
||||
>>> var p = foo().x;
|
||||
1 >^^^^^^^^
|
||||
@@ -150,29 +151,28 @@ sourceFile:ES5For-of34.ts
|
||||
7 > .
|
||||
8 > x
|
||||
9 > ;
|
||||
1 >Emitted(17, 9) Source(5, 5) + SourceIndex(0)
|
||||
2 >Emitted(17, 13) Source(5, 9) + SourceIndex(0)
|
||||
3 >Emitted(17, 14) Source(5, 10) + SourceIndex(0)
|
||||
4 >Emitted(17, 17) Source(5, 13) + SourceIndex(0)
|
||||
5 >Emitted(17, 20) Source(5, 16) + SourceIndex(0)
|
||||
6 >Emitted(17, 22) Source(5, 18) + SourceIndex(0)
|
||||
7 >Emitted(17, 23) Source(5, 19) + SourceIndex(0)
|
||||
8 >Emitted(17, 24) Source(5, 20) + SourceIndex(0)
|
||||
9 >Emitted(17, 25) Source(5, 21) + SourceIndex(0)
|
||||
1 >Emitted(18, 9) Source(5, 5) + SourceIndex(0)
|
||||
2 >Emitted(18, 13) Source(5, 9) + SourceIndex(0)
|
||||
3 >Emitted(18, 14) Source(5, 10) + SourceIndex(0)
|
||||
4 >Emitted(18, 17) Source(5, 13) + SourceIndex(0)
|
||||
5 >Emitted(18, 20) Source(5, 16) + SourceIndex(0)
|
||||
6 >Emitted(18, 22) Source(5, 18) + SourceIndex(0)
|
||||
7 >Emitted(18, 23) Source(5, 19) + SourceIndex(0)
|
||||
8 >Emitted(18, 24) Source(5, 20) + SourceIndex(0)
|
||||
9 >Emitted(18, 25) Source(5, 21) + SourceIndex(0)
|
||||
---
|
||||
>>> }
|
||||
1 >^^^^^
|
||||
1 >
|
||||
>}
|
||||
1 >Emitted(18, 6) Source(6, 2) + SourceIndex(0)
|
||||
1 >Emitted(19, 6) Source(6, 2) + SourceIndex(0)
|
||||
---
|
||||
>>>}
|
||||
>>>catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
>>>finally {
|
||||
>>> try {
|
||||
>>> if (_b && !_b.done && (_c = _a["return"])) _c.call(_a);
|
||||
>>> if (_c && !_c.done && (_a = _b["return"])) _a.call(_b);
|
||||
>>> }
|
||||
>>> finally { if (e_1) throw e_1.error; }
|
||||
>>>}
|
||||
>>>var e_1, _c;
|
||||
>>>//# sourceMappingURL=ES5For-of34.js.map
|
||||
@@ -15,9 +15,10 @@ var __values = (this && this.__values) || function (o) {
|
||||
}
|
||||
};
|
||||
};
|
||||
var e_1, _a;
|
||||
try {
|
||||
for (var _a = __values([2, 3]), _b = _a.next(); !_b.done; _b = _a.next()) {
|
||||
var _c = _b.value, _d = _c.x, a = _d === void 0 ? 0 : _d, _e = _c.y, b = _e === void 0 ? 1 : _e;
|
||||
for (var _b = __values([2, 3]), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
var _d = _c.value, _e = _d.x, a = _e === void 0 ? 0 : _e, _f = _d.y, b = _f === void 0 ? 1 : _f;
|
||||
a;
|
||||
b;
|
||||
}
|
||||
@@ -25,9 +26,8 @@ try {
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_b && !_b.done && (_f = _a["return"])) _f.call(_a);
|
||||
if (_c && !_c.done && (_a = _b["return"])) _a.call(_b);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
var e_1, _f;
|
||||
//# sourceMappingURL=ES5For-of35.js.map
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [ES5For-of35.js.map]
|
||||
{"version":3,"file":"ES5For-of35.js","sourceRoot":"","sources":["ES5For-of35.ts"],"names":[],"mappings":";;;;;;;;;;;IAAA,KAAmC,IAAA,KAAA,SAAA,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA,gBAAA,4BAAE;QAAhC,IAAA,aAAoB,EAAnB,SAAQ,EAAR,0BAAQ,EAAE,SAAQ,EAAR,0BAAQ;QAC1B,CAAC,CAAC;QACF,CAAC,CAAC;KACL"}
|
||||
{"version":3,"file":"ES5For-of35.js","sourceRoot":"","sources":["ES5For-of35.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,KAAmC,IAAA,KAAA,SAAA,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA,gBAAA,4BAAE;QAAhC,IAAA,aAAoB,EAAnB,SAAQ,EAAR,0BAAQ,EAAE,SAAQ,EAAR,0BAAQ;QAC1B,CAAC,CAAC;QACF,CAAC,CAAC;KACL"}
|
||||
@@ -18,8 +18,9 @@ sourceFile:ES5For-of35.ts
|
||||
>>> }
|
||||
>>> };
|
||||
>>>};
|
||||
>>>var e_1, _a;
|
||||
>>>try {
|
||||
>>> for (var _a = __values([2, 3]), _b = _a.next(); !_b.done; _b = _a.next()) {
|
||||
>>> for (var _b = __values([2, 3]), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
1 >^^^^
|
||||
2 > ^^^^^
|
||||
3 > ^^^^
|
||||
@@ -47,21 +48,21 @@ sourceFile:ES5For-of35.ts
|
||||
11>
|
||||
12>
|
||||
13> )
|
||||
1 >Emitted(12, 5) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(12, 10) Source(1, 36) + SourceIndex(0)
|
||||
3 >Emitted(12, 14) Source(1, 36) + SourceIndex(0)
|
||||
4 >Emitted(12, 19) Source(1, 36) + SourceIndex(0)
|
||||
5 >Emitted(12, 28) Source(1, 36) + SourceIndex(0)
|
||||
6 >Emitted(12, 29) Source(1, 37) + SourceIndex(0)
|
||||
7 >Emitted(12, 30) Source(1, 38) + SourceIndex(0)
|
||||
8 >Emitted(12, 32) Source(1, 40) + SourceIndex(0)
|
||||
9 >Emitted(12, 33) Source(1, 41) + SourceIndex(0)
|
||||
10>Emitted(12, 34) Source(1, 42) + SourceIndex(0)
|
||||
11>Emitted(12, 35) Source(1, 42) + SourceIndex(0)
|
||||
12>Emitted(12, 51) Source(1, 42) + SourceIndex(0)
|
||||
13>Emitted(12, 79) Source(1, 44) + SourceIndex(0)
|
||||
1 >Emitted(13, 5) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(13, 10) Source(1, 36) + SourceIndex(0)
|
||||
3 >Emitted(13, 14) Source(1, 36) + SourceIndex(0)
|
||||
4 >Emitted(13, 19) Source(1, 36) + SourceIndex(0)
|
||||
5 >Emitted(13, 28) Source(1, 36) + SourceIndex(0)
|
||||
6 >Emitted(13, 29) Source(1, 37) + SourceIndex(0)
|
||||
7 >Emitted(13, 30) Source(1, 38) + SourceIndex(0)
|
||||
8 >Emitted(13, 32) Source(1, 40) + SourceIndex(0)
|
||||
9 >Emitted(13, 33) Source(1, 41) + SourceIndex(0)
|
||||
10>Emitted(13, 34) Source(1, 42) + SourceIndex(0)
|
||||
11>Emitted(13, 35) Source(1, 42) + SourceIndex(0)
|
||||
12>Emitted(13, 51) Source(1, 42) + SourceIndex(0)
|
||||
13>Emitted(13, 79) Source(1, 44) + SourceIndex(0)
|
||||
---
|
||||
>>> var _c = _b.value, _d = _c.x, a = _d === void 0 ? 0 : _d, _e = _c.y, b = _e === void 0 ? 1 : _e;
|
||||
>>> var _d = _c.value, _e = _d.x, a = _e === void 0 ? 0 : _e, _f = _d.y, b = _f === void 0 ? 1 : _f;
|
||||
1->^^^^^^^^
|
||||
2 > ^^^^
|
||||
3 > ^^^^^^^^^^^^^
|
||||
@@ -84,17 +85,17 @@ sourceFile:ES5For-of35.ts
|
||||
9 > y: b = 1
|
||||
10>
|
||||
11> y: b = 1
|
||||
1->Emitted(13, 9) Source(1, 12) + SourceIndex(0)
|
||||
2 >Emitted(13, 13) Source(1, 12) + SourceIndex(0)
|
||||
3 >Emitted(13, 26) Source(1, 32) + SourceIndex(0)
|
||||
4 >Emitted(13, 28) Source(1, 13) + SourceIndex(0)
|
||||
5 >Emitted(13, 37) Source(1, 21) + SourceIndex(0)
|
||||
6 >Emitted(13, 39) Source(1, 13) + SourceIndex(0)
|
||||
7 >Emitted(13, 65) Source(1, 21) + SourceIndex(0)
|
||||
8 >Emitted(13, 67) Source(1, 23) + SourceIndex(0)
|
||||
9 >Emitted(13, 76) Source(1, 31) + SourceIndex(0)
|
||||
10>Emitted(13, 78) Source(1, 23) + SourceIndex(0)
|
||||
11>Emitted(13, 104) Source(1, 31) + SourceIndex(0)
|
||||
1->Emitted(14, 9) Source(1, 12) + SourceIndex(0)
|
||||
2 >Emitted(14, 13) Source(1, 12) + SourceIndex(0)
|
||||
3 >Emitted(14, 26) Source(1, 32) + SourceIndex(0)
|
||||
4 >Emitted(14, 28) Source(1, 13) + SourceIndex(0)
|
||||
5 >Emitted(14, 37) Source(1, 21) + SourceIndex(0)
|
||||
6 >Emitted(14, 39) Source(1, 13) + SourceIndex(0)
|
||||
7 >Emitted(14, 65) Source(1, 21) + SourceIndex(0)
|
||||
8 >Emitted(14, 67) Source(1, 23) + SourceIndex(0)
|
||||
9 >Emitted(14, 76) Source(1, 31) + SourceIndex(0)
|
||||
10>Emitted(14, 78) Source(1, 23) + SourceIndex(0)
|
||||
11>Emitted(14, 104) Source(1, 31) + SourceIndex(0)
|
||||
---
|
||||
>>> a;
|
||||
1 >^^^^^^^^
|
||||
@@ -105,9 +106,9 @@ sourceFile:ES5For-of35.ts
|
||||
>
|
||||
2 > a
|
||||
3 > ;
|
||||
1 >Emitted(14, 9) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(14, 10) Source(2, 6) + SourceIndex(0)
|
||||
3 >Emitted(14, 11) Source(2, 7) + SourceIndex(0)
|
||||
1 >Emitted(15, 9) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(15, 10) Source(2, 6) + SourceIndex(0)
|
||||
3 >Emitted(15, 11) Source(2, 7) + SourceIndex(0)
|
||||
---
|
||||
>>> b;
|
||||
1->^^^^^^^^
|
||||
@@ -117,23 +118,22 @@ sourceFile:ES5For-of35.ts
|
||||
>
|
||||
2 > b
|
||||
3 > ;
|
||||
1->Emitted(15, 9) Source(3, 5) + SourceIndex(0)
|
||||
2 >Emitted(15, 10) Source(3, 6) + SourceIndex(0)
|
||||
3 >Emitted(15, 11) Source(3, 7) + SourceIndex(0)
|
||||
1->Emitted(16, 9) Source(3, 5) + SourceIndex(0)
|
||||
2 >Emitted(16, 10) Source(3, 6) + SourceIndex(0)
|
||||
3 >Emitted(16, 11) Source(3, 7) + SourceIndex(0)
|
||||
---
|
||||
>>> }
|
||||
1 >^^^^^
|
||||
1 >
|
||||
>}
|
||||
1 >Emitted(16, 6) Source(4, 2) + SourceIndex(0)
|
||||
1 >Emitted(17, 6) Source(4, 2) + SourceIndex(0)
|
||||
---
|
||||
>>>}
|
||||
>>>catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
>>>finally {
|
||||
>>> try {
|
||||
>>> if (_b && !_b.done && (_f = _a["return"])) _f.call(_a);
|
||||
>>> if (_c && !_c.done && (_a = _b["return"])) _a.call(_b);
|
||||
>>> }
|
||||
>>> finally { if (e_1) throw e_1.error; }
|
||||
>>>}
|
||||
>>>var e_1, _f;
|
||||
>>>//# sourceMappingURL=ES5For-of35.js.map
|
||||
@@ -31,9 +31,10 @@ var __read = (this && this.__read) || function (o, n) {
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var e_1, _a;
|
||||
try {
|
||||
for (var _a = __values([2, 3]), _b = _a.next(); !_b.done; _b = _a.next()) {
|
||||
var _c = __read(_b.value, 2), _d = _c[0], a = _d === void 0 ? 0 : _d, _e = _c[1], b = _e === void 0 ? 1 : _e;
|
||||
for (var _b = __values([2, 3]), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
var _d = __read(_c.value, 2), _e = _d[0], a = _e === void 0 ? 0 : _e, _f = _d[1], b = _f === void 0 ? 1 : _f;
|
||||
a;
|
||||
b;
|
||||
}
|
||||
@@ -41,9 +42,8 @@ try {
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_b && !_b.done && (_f = _a["return"])) _f.call(_a);
|
||||
if (_c && !_c.done && (_a = _b["return"])) _a.call(_b);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
var e_1, _f;
|
||||
//# sourceMappingURL=ES5For-of36.js.map
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [ES5For-of36.js.map]
|
||||
{"version":3,"file":"ES5For-of36.js","sourceRoot":"","sources":["ES5For-of36.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;IAAA,KAA2B,IAAA,KAAA,SAAA,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA,gBAAA,4BAAE;QAA1B,IAAA,wBAAc,EAAb,UAAK,EAAL,0BAAK,EAAE,UAAK,EAAL,0BAAK;QAClB,CAAC,CAAC;QACF,CAAC,CAAC;KACL"}
|
||||
{"version":3,"file":"ES5For-of36.js","sourceRoot":"","sources":["ES5For-of36.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAA,KAA2B,IAAA,KAAA,SAAA,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA,gBAAA,4BAAE;QAA1B,IAAA,wBAAc,EAAb,UAAK,EAAL,0BAAK,EAAE,UAAK,EAAL,0BAAK;QAClB,CAAC,CAAC;QACF,CAAC,CAAC;KACL"}
|
||||
@@ -34,8 +34,9 @@ sourceFile:ES5For-of36.ts
|
||||
>>> }
|
||||
>>> return ar;
|
||||
>>>};
|
||||
>>>var e_1, _a;
|
||||
>>>try {
|
||||
>>> for (var _a = __values([2, 3]), _b = _a.next(); !_b.done; _b = _a.next()) {
|
||||
>>> for (var _b = __values([2, 3]), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
1 >^^^^
|
||||
2 > ^^^^^
|
||||
3 > ^^^^
|
||||
@@ -63,21 +64,21 @@ sourceFile:ES5For-of36.ts
|
||||
11>
|
||||
12>
|
||||
13> )
|
||||
1 >Emitted(28, 5) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(28, 10) Source(1, 28) + SourceIndex(0)
|
||||
3 >Emitted(28, 14) Source(1, 28) + SourceIndex(0)
|
||||
4 >Emitted(28, 19) Source(1, 28) + SourceIndex(0)
|
||||
5 >Emitted(28, 28) Source(1, 28) + SourceIndex(0)
|
||||
6 >Emitted(28, 29) Source(1, 29) + SourceIndex(0)
|
||||
7 >Emitted(28, 30) Source(1, 30) + SourceIndex(0)
|
||||
8 >Emitted(28, 32) Source(1, 32) + SourceIndex(0)
|
||||
9 >Emitted(28, 33) Source(1, 33) + SourceIndex(0)
|
||||
10>Emitted(28, 34) Source(1, 34) + SourceIndex(0)
|
||||
11>Emitted(28, 35) Source(1, 34) + SourceIndex(0)
|
||||
12>Emitted(28, 51) Source(1, 34) + SourceIndex(0)
|
||||
13>Emitted(28, 79) Source(1, 36) + SourceIndex(0)
|
||||
1 >Emitted(29, 5) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(29, 10) Source(1, 28) + SourceIndex(0)
|
||||
3 >Emitted(29, 14) Source(1, 28) + SourceIndex(0)
|
||||
4 >Emitted(29, 19) Source(1, 28) + SourceIndex(0)
|
||||
5 >Emitted(29, 28) Source(1, 28) + SourceIndex(0)
|
||||
6 >Emitted(29, 29) Source(1, 29) + SourceIndex(0)
|
||||
7 >Emitted(29, 30) Source(1, 30) + SourceIndex(0)
|
||||
8 >Emitted(29, 32) Source(1, 32) + SourceIndex(0)
|
||||
9 >Emitted(29, 33) Source(1, 33) + SourceIndex(0)
|
||||
10>Emitted(29, 34) Source(1, 34) + SourceIndex(0)
|
||||
11>Emitted(29, 35) Source(1, 34) + SourceIndex(0)
|
||||
12>Emitted(29, 51) Source(1, 34) + SourceIndex(0)
|
||||
13>Emitted(29, 79) Source(1, 36) + SourceIndex(0)
|
||||
---
|
||||
>>> var _c = __read(_b.value, 2), _d = _c[0], a = _d === void 0 ? 0 : _d, _e = _c[1], b = _e === void 0 ? 1 : _e;
|
||||
>>> var _d = __read(_c.value, 2), _e = _d[0], a = _e === void 0 ? 0 : _e, _f = _d[1], b = _f === void 0 ? 1 : _f;
|
||||
1->^^^^^^^^
|
||||
2 > ^^^^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@@ -100,17 +101,17 @@ sourceFile:ES5For-of36.ts
|
||||
9 > b = 1
|
||||
10>
|
||||
11> b = 1
|
||||
1->Emitted(29, 9) Source(1, 10) + SourceIndex(0)
|
||||
2 >Emitted(29, 13) Source(1, 10) + SourceIndex(0)
|
||||
3 >Emitted(29, 37) Source(1, 24) + SourceIndex(0)
|
||||
4 >Emitted(29, 39) Source(1, 11) + SourceIndex(0)
|
||||
5 >Emitted(29, 49) Source(1, 16) + SourceIndex(0)
|
||||
6 >Emitted(29, 51) Source(1, 11) + SourceIndex(0)
|
||||
7 >Emitted(29, 77) Source(1, 16) + SourceIndex(0)
|
||||
8 >Emitted(29, 79) Source(1, 18) + SourceIndex(0)
|
||||
9 >Emitted(29, 89) Source(1, 23) + SourceIndex(0)
|
||||
10>Emitted(29, 91) Source(1, 18) + SourceIndex(0)
|
||||
11>Emitted(29, 117) Source(1, 23) + SourceIndex(0)
|
||||
1->Emitted(30, 9) Source(1, 10) + SourceIndex(0)
|
||||
2 >Emitted(30, 13) Source(1, 10) + SourceIndex(0)
|
||||
3 >Emitted(30, 37) Source(1, 24) + SourceIndex(0)
|
||||
4 >Emitted(30, 39) Source(1, 11) + SourceIndex(0)
|
||||
5 >Emitted(30, 49) Source(1, 16) + SourceIndex(0)
|
||||
6 >Emitted(30, 51) Source(1, 11) + SourceIndex(0)
|
||||
7 >Emitted(30, 77) Source(1, 16) + SourceIndex(0)
|
||||
8 >Emitted(30, 79) Source(1, 18) + SourceIndex(0)
|
||||
9 >Emitted(30, 89) Source(1, 23) + SourceIndex(0)
|
||||
10>Emitted(30, 91) Source(1, 18) + SourceIndex(0)
|
||||
11>Emitted(30, 117) Source(1, 23) + SourceIndex(0)
|
||||
---
|
||||
>>> a;
|
||||
1 >^^^^^^^^
|
||||
@@ -121,9 +122,9 @@ sourceFile:ES5For-of36.ts
|
||||
>
|
||||
2 > a
|
||||
3 > ;
|
||||
1 >Emitted(30, 9) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(30, 10) Source(2, 6) + SourceIndex(0)
|
||||
3 >Emitted(30, 11) Source(2, 7) + SourceIndex(0)
|
||||
1 >Emitted(31, 9) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(31, 10) Source(2, 6) + SourceIndex(0)
|
||||
3 >Emitted(31, 11) Source(2, 7) + SourceIndex(0)
|
||||
---
|
||||
>>> b;
|
||||
1->^^^^^^^^
|
||||
@@ -133,23 +134,22 @@ sourceFile:ES5For-of36.ts
|
||||
>
|
||||
2 > b
|
||||
3 > ;
|
||||
1->Emitted(31, 9) Source(3, 5) + SourceIndex(0)
|
||||
2 >Emitted(31, 10) Source(3, 6) + SourceIndex(0)
|
||||
3 >Emitted(31, 11) Source(3, 7) + SourceIndex(0)
|
||||
1->Emitted(32, 9) Source(3, 5) + SourceIndex(0)
|
||||
2 >Emitted(32, 10) Source(3, 6) + SourceIndex(0)
|
||||
3 >Emitted(32, 11) Source(3, 7) + SourceIndex(0)
|
||||
---
|
||||
>>> }
|
||||
1 >^^^^^
|
||||
1 >
|
||||
>}
|
||||
1 >Emitted(32, 6) Source(4, 2) + SourceIndex(0)
|
||||
1 >Emitted(33, 6) Source(4, 2) + SourceIndex(0)
|
||||
---
|
||||
>>>}
|
||||
>>>catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
>>>finally {
|
||||
>>> try {
|
||||
>>> if (_b && !_b.done && (_f = _a["return"])) _f.call(_a);
|
||||
>>> if (_c && !_c.done && (_a = _b["return"])) _a.call(_b);
|
||||
>>> }
|
||||
>>> finally { if (e_1) throw e_1.error; }
|
||||
>>>}
|
||||
>>>var e_1, _f;
|
||||
>>>//# sourceMappingURL=ES5For-of36.js.map
|
||||
@@ -11,9 +11,9 @@ var obj = {
|
||||
obj[Symbol.foo];
|
||||
|
||||
//// [ES5SymbolProperty1.js]
|
||||
var _a;
|
||||
var Symbol;
|
||||
var obj = (_a = {},
|
||||
_a[Symbol.foo] = 0,
|
||||
_a);
|
||||
obj[Symbol.foo];
|
||||
var _a;
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
var v = { [yield]: foo }
|
||||
|
||||
//// [FunctionDeclaration8_es6.js]
|
||||
var v = (_a = {}, _a[yield] = foo, _a);
|
||||
var _a;
|
||||
var v = (_a = {}, _a[yield] = foo, _a);
|
||||
|
||||
@@ -19,9 +19,9 @@ for (; ;) {
|
||||
|
||||
//// [SystemModuleForStatementNoInitializer.js]
|
||||
System.register([], function (exports_1, context_1) {
|
||||
var i, limit;
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var i, limit;
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
|
||||
@@ -17,9 +17,9 @@ module M {
|
||||
|
||||
//// [aliasesInSystemModule1.js]
|
||||
System.register(["foo"], function (exports_1, context_1) {
|
||||
var alias, cls, cls2, x, y, z, M;
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var alias, cls, cls2, x, y, z, M;
|
||||
return {
|
||||
setters: [
|
||||
function (alias_1) {
|
||||
|
||||
@@ -16,9 +16,9 @@ module M {
|
||||
|
||||
//// [aliasesInSystemModule2.js]
|
||||
System.register(["foo"], function (exports_1, context_1) {
|
||||
var foo_1, cls, cls2, x, y, z, M;
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var foo_1, cls, cls2, x, y, z, M;
|
||||
return {
|
||||
setters: [
|
||||
function (foo_1_1) {
|
||||
|
||||
@@ -11,9 +11,9 @@ export class Foo {
|
||||
|
||||
//// [a.js]
|
||||
System.register(["./b"], function (exports_1, context_1) {
|
||||
var b_1, x;
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var b_1, x;
|
||||
return {
|
||||
setters: [
|
||||
function (b_1_1) {
|
||||
|
||||
@@ -12,9 +12,9 @@ export class Foo {
|
||||
|
||||
//// [b.js]
|
||||
System.register([], function (exports_1, context_1) {
|
||||
var Foo;
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var Foo;
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
@@ -29,9 +29,9 @@ System.register([], function (exports_1, context_1) {
|
||||
});
|
||||
//// [a.js]
|
||||
System.register(["./b"], function (exports_1, context_1) {
|
||||
var b_1, x;
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var b_1, x;
|
||||
return {
|
||||
setters: [
|
||||
function (b_1_1) {
|
||||
|
||||
@@ -13,9 +13,9 @@ export var x = new Foo();
|
||||
|
||||
//// [a.js]
|
||||
System.register(["./b"], function (exports_1, context_1) {
|
||||
var b_1, x;
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var b_1, x;
|
||||
return {
|
||||
setters: [
|
||||
function (b_1_1) {
|
||||
|
||||
@@ -13,9 +13,9 @@ export var x = new Foo();
|
||||
|
||||
//// [a.js]
|
||||
System.register(["./b"], function (exports_1, context_1) {
|
||||
var b_1, x;
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var b_1, x;
|
||||
return {
|
||||
setters: [
|
||||
function (b_1_1) {
|
||||
|
||||
@@ -12,9 +12,9 @@ Foo.foo();
|
||||
|
||||
//// [a.js]
|
||||
System.register(["./b"], function (exports_1, context_1) {
|
||||
var b_1;
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var b_1;
|
||||
return {
|
||||
setters: [
|
||||
function (b_1_1) {
|
||||
|
||||
@@ -12,9 +12,9 @@ Foo.foo();
|
||||
|
||||
//// [a.js]
|
||||
System.register(["./b"], function (exports_1, context_1) {
|
||||
var b_1;
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var b_1;
|
||||
return {
|
||||
setters: [
|
||||
function (b_1_1) {
|
||||
|
||||
@@ -8,9 +8,9 @@ export default function() {}
|
||||
|
||||
//// [a.js]
|
||||
System.register([], function (exports_1, context_1) {
|
||||
var default_1;
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var default_1;
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
|
||||
@@ -30,6 +30,7 @@ for (x of a) {
|
||||
|
||||
|
||||
//// [assignmentTypeNarrowing.js]
|
||||
var _a, _b, _c;
|
||||
var x;
|
||||
x = "";
|
||||
x; // string
|
||||
@@ -50,4 +51,3 @@ for (var _i = 0, a_1 = a; _i < a_1.length; _i++) {
|
||||
x = a_1[_i];
|
||||
x; // string
|
||||
}
|
||||
var _a, _b, _c;
|
||||
|
||||
@@ -8,8 +8,8 @@ var bar = async (): Promise<void> => {
|
||||
//// [asyncArrowFunction7_es5.js]
|
||||
var _this = this;
|
||||
var bar = function () { return __awaiter(_this, void 0, void 0, function () {
|
||||
var _this = this;
|
||||
var foo;
|
||||
var _this = this;
|
||||
return __generator(this, function (_a) {
|
||||
foo = function (a) {
|
||||
if (a === void 0) { a = yield ; }
|
||||
|
||||
@@ -6,7 +6,7 @@ var foo = async (): Promise<void> => {
|
||||
//// [asyncArrowFunction8_es5.js]
|
||||
var _this = this;
|
||||
var foo = function () { return __awaiter(_this, void 0, void 0, function () {
|
||||
var v, _a;
|
||||
var _a, v;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
|
||||
@@ -20,6 +20,7 @@ A.B.C.func();
|
||||
var A = /** @class */ (function () {
|
||||
function A() {
|
||||
}
|
||||
var _a;
|
||||
A.B = (_a = /** @class */ (function () {
|
||||
function B() {
|
||||
}
|
||||
@@ -47,6 +48,5 @@ var A = /** @class */ (function () {
|
||||
}()),
|
||||
_a);
|
||||
return A;
|
||||
var _a;
|
||||
}());
|
||||
A.B.C.func();
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
var v = { [await]: foo }
|
||||
|
||||
//// [asyncFunctionDeclaration8_es5.js]
|
||||
var v = (_a = {}, _a[await] = foo, _a);
|
||||
var _a;
|
||||
var v = (_a = {}, _a[await] = foo, _a);
|
||||
|
||||
@@ -6,7 +6,7 @@ async function foo(): Promise<void> {
|
||||
//// [asyncFunctionDeclaration9_es5.js]
|
||||
function foo() {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var v, _a;
|
||||
var _a, v;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
|
||||
@@ -51,8 +51,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
||||
};
|
||||
var _this = this;
|
||||
(function (_a) { return __awaiter(_this, void 0, void 0, function () {
|
||||
var foo = _a.foo, bar = _a.bar, rest = __rest(_a, ["foo", "bar"]);
|
||||
var _b;
|
||||
var foo = _a.foo, bar = _a.bar, rest = __rest(_a, ["foo", "bar"]);
|
||||
return __generator(this, function (_c) {
|
||||
switch (_c.label) {
|
||||
case 0:
|
||||
|
||||
@@ -224,14 +224,14 @@ async function fn40(x) {
|
||||
|
||||
//// [asyncWithVarShadowing_es6.js]
|
||||
function fn1(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn2(x) {
|
||||
var x, z;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
});
|
||||
var x, z;
|
||||
}
|
||||
function fn3(x) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
@@ -239,139 +239,139 @@ function fn3(x) {
|
||||
});
|
||||
}
|
||||
function fn4(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
x = y;
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn5(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
({ x } = y);
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn6(x) {
|
||||
var x, z;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
({ x, z } = y);
|
||||
});
|
||||
var x, z;
|
||||
}
|
||||
function fn7(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
({ x = y } = y);
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn8(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
({ z: x } = y);
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn9(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
({ z: { x } } = y);
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn10(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
({ z: { x } = y } = y);
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn11(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
x = __rest(y, []);
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn12(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
[x] = y;
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn13(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
[x = y] = y;
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn14(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
[, x] = y;
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn15(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
[...x] = y;
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn16(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
[[x]] = y;
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn17(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
[[x] = y] = y;
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn18({ x }) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn19([x]) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn20(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
{
|
||||
}
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn21(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (y) {
|
||||
}
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn22(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (y) {
|
||||
}
|
||||
else {
|
||||
}
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn23(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn24(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn25(x) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
@@ -392,106 +392,106 @@ function fn26(x) {
|
||||
});
|
||||
}
|
||||
function fn27(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
}
|
||||
finally {
|
||||
}
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn28(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
while (y) {
|
||||
}
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn29(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
do {
|
||||
} while (y);
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn30(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
for (x = y;;) {
|
||||
}
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn31(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
for ({ x } = y;;) {
|
||||
}
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn32(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
for (;;) {
|
||||
}
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn33(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
for (x in y) {
|
||||
}
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn34(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
for (var z in y) {
|
||||
}
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn35(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
for (x of y) {
|
||||
}
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn36(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
for ({ x } of y) {
|
||||
}
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn37(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
for (var z of y) {
|
||||
}
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn38(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
switch (y) {
|
||||
case y:
|
||||
}
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn39(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
foo: {
|
||||
break foo;
|
||||
}
|
||||
});
|
||||
var x;
|
||||
}
|
||||
function fn40(x) {
|
||||
var x;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
}
|
||||
catch (_a) {
|
||||
}
|
||||
});
|
||||
var x;
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ export let [,,[,[],,[],]] = undefined as any;
|
||||
//// [bindingPatternOmittedExpressionNesting.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
exports._e = (_a = undefined, _b = _a[2], _c = _b[1], _d = _b[3]);
|
||||
var _a, _b, _c, _d;
|
||||
exports._e = (_a = undefined, _b = _a[2], _c = _b[1], _d = _b[3]);
|
||||
|
||||
|
||||
//// [bindingPatternOmittedExpressionNesting.d.ts]
|
||||
|
||||
@@ -45,7 +45,7 @@ var __values = (this && this.__values) || function (o) {
|
||||
};
|
||||
};
|
||||
function a() {
|
||||
var _loop_1, _a, _b, i, e_1_1, e_1, _c;
|
||||
var e_1, _a, _loop_1, _b, _c, i, e_1_1;
|
||||
return __generator(this, function (_d) {
|
||||
switch (_d.label) {
|
||||
case 0:
|
||||
@@ -64,17 +64,17 @@ function a() {
|
||||
_d.label = 1;
|
||||
case 1:
|
||||
_d.trys.push([1, 6, 7, 8]);
|
||||
_a = __values([1, 2, 3]), _b = _a.next();
|
||||
_b = __values([1, 2, 3]), _c = _b.next();
|
||||
_d.label = 2;
|
||||
case 2:
|
||||
if (!!_b.done) return [3 /*break*/, 5];
|
||||
i = _b.value;
|
||||
if (!!_c.done) return [3 /*break*/, 5];
|
||||
i = _c.value;
|
||||
return [5 /*yield**/, _loop_1(i)];
|
||||
case 3:
|
||||
_d.sent();
|
||||
_d.label = 4;
|
||||
case 4:
|
||||
_b = _a.next();
|
||||
_c = _b.next();
|
||||
return [3 /*break*/, 2];
|
||||
case 5: return [3 /*break*/, 8];
|
||||
case 6:
|
||||
@@ -83,7 +83,7 @@ function a() {
|
||||
return [3 /*break*/, 8];
|
||||
case 7:
|
||||
try {
|
||||
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
||||
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
return [7 /*endfinally*/];
|
||||
|
||||
@@ -163,6 +163,7 @@ function foo8() {
|
||||
var x;
|
||||
}
|
||||
function foo9() {
|
||||
var _a;
|
||||
var y = (_a = /** @class */ (function () {
|
||||
function class_3() {
|
||||
}
|
||||
@@ -171,7 +172,6 @@ function foo9() {
|
||||
_a.a = x,
|
||||
_a);
|
||||
var x;
|
||||
var _a;
|
||||
}
|
||||
function foo10() {
|
||||
var A = /** @class */ (function () {
|
||||
@@ -184,6 +184,7 @@ function foo10() {
|
||||
}
|
||||
function foo11() {
|
||||
function f() {
|
||||
var _a;
|
||||
var y = (_a = /** @class */ (function () {
|
||||
function class_4() {
|
||||
}
|
||||
@@ -191,7 +192,6 @@ function foo11() {
|
||||
}()),
|
||||
_a.a = x,
|
||||
_a);
|
||||
var _a;
|
||||
}
|
||||
var x;
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@ var __extends = (this && this.__extends) || (function () {
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var _a, _b, _c, _d, _e, _f, _g;
|
||||
function foo(x, y) {
|
||||
var z = [];
|
||||
for (var _i = 2; _i < arguments.length; _i++) {
|
||||
@@ -128,4 +129,3 @@ var D = /** @class */ (function (_super) {
|
||||
};
|
||||
return D;
|
||||
}(C));
|
||||
var _a, _b, _c, _d, _e, _f, _g;
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
"use strict";
|
||||
var _loop_1 = function (i) {
|
||||
(function () {
|
||||
return _a = [i + 1], i = _a[0], _a;
|
||||
var _a;
|
||||
return _a = [i + 1], i = _a[0], _a;
|
||||
})();
|
||||
out_i_1 = i;
|
||||
};
|
||||
@@ -35,8 +35,8 @@
|
||||
"use strict";
|
||||
var _loop_2 = function (i) {
|
||||
(function () {
|
||||
return (_a = { a: i + 1 }, i = _a.a, _a);
|
||||
var _a;
|
||||
return (_a = { a: i + 1 }, i = _a.a, _a);
|
||||
})();
|
||||
out_i_2 = i;
|
||||
};
|
||||
|
||||
@@ -34,10 +34,10 @@ var Main = /** @class */ (function () {
|
||||
names[_i] = arguments[_i];
|
||||
}
|
||||
var _loop_1 = function (name_1) {
|
||||
var _a;
|
||||
this_1.bar((_a = {},
|
||||
_a[name_1 + ".a"] = function () { _this.foo(name_1); },
|
||||
_a));
|
||||
var _a;
|
||||
};
|
||||
var this_1 = this;
|
||||
for (var _a = 0, names_1 = names; _a < names_1.length; _a++) {
|
||||
|
||||
@@ -144,6 +144,7 @@ for (const y = 0; y < 1;) {
|
||||
|
||||
//// [capturedLetConstInLoop4.js]
|
||||
System.register([], function (exports_1, context_1) {
|
||||
var v0, v00, v1, v2, v3, v4, v5, v6, v7, v8, v0_c, v00_c, v1_c, v2_c, v3_c, v4_c, v5_c, v6_c, v7_c, v8_c;
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
//======let
|
||||
@@ -156,7 +157,6 @@ System.register([], function (exports_1, context_1) {
|
||||
return v0_c + v00_c + v1_c + v2_c + v3_c + v4_c + v5_c + v6_c + v7_c + v8_c;
|
||||
}
|
||||
exports_1("exportedFoo2", exportedFoo2);
|
||||
var v0, v00, v1, v2, v3, v4, v5, v6, v7, v8, v0_c, v00_c, v1_c, v2_c, v3_c, v4_c, v5_c, v6_c, v7_c, v8_c;
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
|
||||
@@ -178,15 +178,16 @@ for (var x = 0; x < 1; ++x) {
|
||||
}
|
||||
function foo() {
|
||||
var _loop_3 = function (a) {
|
||||
var _a;
|
||||
if (a === 1) {
|
||||
return "break";
|
||||
}
|
||||
if (a === 2) {
|
||||
return "break-l0";
|
||||
}
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var b = _a[_i];
|
||||
_d = [{ x: 1, y: 2 }][0], x = _d.x, z = _d.y;
|
||||
for (var _i = 0, _b = []; _i < _b.length; _i++) {
|
||||
var b = _b[_i];
|
||||
_a = [{ x: 1, y: 2 }][0], x = _a.x, z = _a.y;
|
||||
if (b === 1) {
|
||||
break;
|
||||
}
|
||||
@@ -199,6 +200,7 @@ function foo() {
|
||||
return { value: 50 };
|
||||
}
|
||||
var _loop_4 = function (b) {
|
||||
var _a;
|
||||
_a = [{ x1: 1, y: arguments_1.length }][0], x1 = _a.x1, z1 = _a.y;
|
||||
if (b === 1) {
|
||||
return "break";
|
||||
@@ -208,10 +210,9 @@ function foo() {
|
||||
}
|
||||
(function () { return b; });
|
||||
return { value: 100 };
|
||||
var _a;
|
||||
};
|
||||
for (var _b = 0, _c = []; _b < _c.length; _b++) {
|
||||
var b = _c[_b];
|
||||
for (var _c = 0, _d = []; _c < _d.length; _c++) {
|
||||
var b = _d[_c];
|
||||
var state_2 = _loop_4(b);
|
||||
if (typeof state_2 === "object")
|
||||
return state_2;
|
||||
@@ -222,7 +223,6 @@ function foo() {
|
||||
}
|
||||
}
|
||||
(function () { return a; });
|
||||
var _d;
|
||||
};
|
||||
var arguments_1 = arguments, x, z, x1, z1;
|
||||
l0: for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
|
||||
@@ -15,8 +15,8 @@ function foo(y, x) {
|
||||
_a.c = x,
|
||||
_a); }
|
||||
if (x === void 0) { x = 1; }
|
||||
y.c;
|
||||
var _a;
|
||||
y.c;
|
||||
}
|
||||
function foo2(y, x) {
|
||||
if (y === void 0) { y = (_b = /** @class */ (function () {
|
||||
|
||||
@@ -25,6 +25,7 @@ obj.bar1 = "42";
|
||||
obj.arrowFunc(0);
|
||||
|
||||
//// [0.js]
|
||||
var _a;
|
||||
// @ts-check
|
||||
var lol = "hello Lol";
|
||||
var obj = (_a = {
|
||||
@@ -50,4 +51,3 @@ obj.bar = undefined;
|
||||
var k = obj.method1(0);
|
||||
obj.bar1 = "42";
|
||||
obj.arrowFunc(0);
|
||||
var _a;
|
||||
|
||||
@@ -35,6 +35,7 @@ function f(b: boolean) {
|
||||
|
||||
//// [classBlockScoping.js]
|
||||
function f(b) {
|
||||
var _a;
|
||||
var Foo;
|
||||
if (b) {
|
||||
Foo = (_a = /** @class */ (function () {
|
||||
@@ -67,5 +68,4 @@ function f(b) {
|
||||
}());
|
||||
new Foo_1();
|
||||
}
|
||||
var _a;
|
||||
}
|
||||
|
||||
@@ -18,11 +18,11 @@ var A = /** @class */ (function () {
|
||||
A[(_a = A.p1, A.p2)] = function () { return 0; };
|
||||
;
|
||||
A.prototype[A.p1] = function () { };
|
||||
var _a, _b;
|
||||
_b = A.p2;
|
||||
A.p1 = Symbol();
|
||||
A.p2 = Symbol();
|
||||
// All of the below should be out of scope or TDZ - `A` has not finished being constructed as they are executed
|
||||
A[_a] = 0;
|
||||
return A;
|
||||
var _a, _b;
|
||||
}());
|
||||
|
||||
@@ -6,6 +6,7 @@ var v = class C {
|
||||
};
|
||||
|
||||
//// [classExpressionWithStaticProperties1.js]
|
||||
var _a;
|
||||
var v = (_a = /** @class */ (function () {
|
||||
function C() {
|
||||
}
|
||||
@@ -15,4 +16,3 @@ var v = (_a = /** @class */ (function () {
|
||||
_a.b = 2,
|
||||
_a.c = _a.a + _a.b,
|
||||
_a);
|
||||
var _a;
|
||||
|
||||
@@ -9,6 +9,7 @@ var v = class C {
|
||||
};
|
||||
|
||||
//// [classExpressionWithStaticProperties2.js]
|
||||
var _a;
|
||||
var v = (_a = /** @class */ (function () {
|
||||
function C() {
|
||||
}
|
||||
@@ -20,4 +21,3 @@ var v = (_a = /** @class */ (function () {
|
||||
},
|
||||
_a.d = _a.c.x + " world",
|
||||
_a);
|
||||
var _a;
|
||||
|
||||
@@ -10,6 +10,7 @@ for (let i = 0; i < 3; i++) {
|
||||
arr.forEach(C => console.log(C.y()));
|
||||
|
||||
//// [classExpressionWithStaticProperties3.js]
|
||||
var _a;
|
||||
var arr = [];
|
||||
var _loop_1 = function (i) {
|
||||
arr.push((_a = /** @class */ (function () {
|
||||
@@ -25,4 +26,3 @@ for (var i = 0; i < 3; i++) {
|
||||
_loop_1(i);
|
||||
}
|
||||
arr.forEach(function (C) { return console.log(C.y()); });
|
||||
var _a;
|
||||
|
||||
@@ -6,10 +6,10 @@ var v = class C {
|
||||
};
|
||||
|
||||
//// [classExpressionWithStaticPropertiesES61.js]
|
||||
var _a;
|
||||
var v = (_a = class C {
|
||||
},
|
||||
_a.a = 1,
|
||||
_a.b = 2,
|
||||
_a.c = _a.a + 3,
|
||||
_a);
|
||||
var _a;
|
||||
|
||||
@@ -9,6 +9,7 @@ var v = class C {
|
||||
};
|
||||
|
||||
//// [classExpressionWithStaticPropertiesES62.js]
|
||||
var _a;
|
||||
var v = (_a = class C {
|
||||
},
|
||||
_a.a = 1,
|
||||
@@ -17,4 +18,3 @@ var v = (_a = class C {
|
||||
},
|
||||
_a.d = _a.c.x + " world",
|
||||
_a);
|
||||
var _a;
|
||||
|
||||
@@ -10,6 +10,7 @@ for (let i = 0; i < 3; i++) {
|
||||
arr.forEach(C => console.log(C.y()));
|
||||
|
||||
//// [classExpressionWithStaticPropertiesES63.js]
|
||||
var _a;
|
||||
const arr = [];
|
||||
for (let i = 0; i < 3; i++) {
|
||||
arr.push((_a = class C {
|
||||
@@ -19,4 +20,3 @@ for (let i = 0; i < 3; i++) {
|
||||
_a));
|
||||
}
|
||||
arr.forEach(C => console.log(C.y()));
|
||||
var _a;
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
|
||||
//// [classExpressionWithStaticPropertiesES64.js]
|
||||
var _a;
|
||||
(_a = class {
|
||||
},
|
||||
_a.x = 0,
|
||||
_a);
|
||||
var _a;
|
||||
|
||||
@@ -8,7 +8,7 @@ function f (m: string) {
|
||||
//// [commaOperatorInConditionalExpression.js]
|
||||
function f(m) {
|
||||
[1, 2, 3].map(function (i) {
|
||||
return true ? (_a = {}, _a[m] = i, _a) : (_b = {}, _b[m] = i + 1, _b);
|
||||
var _a, _b;
|
||||
return true ? (_a = {}, _a[m] = i, _a) : (_b = {}, _b[m] = i + 1, _b);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ function fn2(x4: number) {
|
||||
(x3['a']) **= value;
|
||||
|
||||
//// [compoundExponentiationAssignmentLHSIsReference.js]
|
||||
var _a, _b, _c;
|
||||
var value;
|
||||
// identifiers: variable and parameter
|
||||
var x1;
|
||||
@@ -45,4 +46,3 @@ function fn2(x4) {
|
||||
}
|
||||
(x3.a) = Math.pow((x3.a), value);
|
||||
(x3['a']) = Math.pow((x3['a']), value);
|
||||
var _a, _b, _c;
|
||||
|
||||
@@ -96,6 +96,7 @@ var __extends = (this && this.__extends) || (function () {
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var _a;
|
||||
// expected error for all the LHS of compound assignments (arithmetic and addition)
|
||||
var value;
|
||||
// this
|
||||
@@ -144,18 +145,19 @@ _a = Math.pow(['', ''], value), '' = _a[0], '' = _a[1];
|
||||
var Derived = /** @class */ (function (_super) {
|
||||
__extends(Derived, _super);
|
||||
function Derived() {
|
||||
var _this = _super.call(this) || this;
|
||||
(_a = _super.prototype). = Math.pow(_a., value);
|
||||
var _this = this;
|
||||
var _a;
|
||||
_this = _super.call(this) || this;
|
||||
(_a = _super.prototype). = Math.pow(_a., value);
|
||||
return _this;
|
||||
}
|
||||
Derived.prototype.foo = function () {
|
||||
(_a = _super.prototype). = Math.pow(_a., value);
|
||||
var _a;
|
||||
(_a = _super.prototype). = Math.pow(_a., value);
|
||||
};
|
||||
Derived.sfoo = function () {
|
||||
(_a = _super). = Math.pow(_a., value);
|
||||
var _a;
|
||||
(_a = _super). = Math.pow(_a., value);
|
||||
};
|
||||
return Derived;
|
||||
}(C));
|
||||
@@ -181,4 +183,3 @@ foo() = Math.pow(foo(), value);
|
||||
([]) = Math.pow(([]), value);
|
||||
(function baz1() { }) = Math.pow((function baz1() { }), value);
|
||||
(foo()) = Math.pow((foo()), value);
|
||||
var _a;
|
||||
|
||||
@@ -38,14 +38,15 @@ let [{[foo.toExponential()]: bar7}] = [{bar: "bar"}];
|
||||
|
||||
|
||||
//// [computedPropertiesInDestructuring1.js]
|
||||
var _a, _b, _c, _d, _e, _f;
|
||||
// destructuring in variable declarations
|
||||
var foo = "bar";
|
||||
var _a = foo, bar = { bar: "bar" }[_a];
|
||||
var _g = foo, bar = { bar: "bar" }[_g];
|
||||
var bar2 = { bar: "bar" }["bar"];
|
||||
var foo2 = function () { return "bar"; };
|
||||
var _b = foo2(), bar3 = { bar: "bar" }[_b];
|
||||
var _c = foo, bar4 = [{ bar: "bar" }][0][_c];
|
||||
var _d = foo2(), bar5 = [{ bar: "bar" }][0][_d];
|
||||
var _h = foo2(), bar3 = { bar: "bar" }[_h];
|
||||
var _j = foo, bar4 = [{ bar: "bar" }][0][_j];
|
||||
var _k = foo2(), bar5 = [{ bar: "bar" }][0][_k];
|
||||
function f1(_a) {
|
||||
var x = _a["bar"];
|
||||
}
|
||||
@@ -62,14 +63,13 @@ function f5(_a) {
|
||||
var _b = foo2(), x = _a[0][_b];
|
||||
}
|
||||
// report errors on type errors in computed properties used in destructuring
|
||||
var _e = foo(), bar6 = [{ bar: "bar" }][0][_e];
|
||||
var _f = foo.toExponential(), bar7 = [{ bar: "bar" }][0][_f];
|
||||
var _l = foo(), bar6 = [{ bar: "bar" }][0][_l];
|
||||
var _m = foo.toExponential(), bar7 = [{ bar: "bar" }][0][_m];
|
||||
// destructuring assignment
|
||||
(_g = foo, bar = { bar: "bar" }[_g]);
|
||||
(_a = foo, bar = { bar: "bar" }[_a]);
|
||||
(bar2 = { bar: "bar" }["bar"]);
|
||||
(_h = foo2(), bar3 = { bar: "bar" }[_h]);
|
||||
_j = foo, bar4 = [{ bar: "bar" }][0][_j];
|
||||
_k = foo2(), bar5 = [{ bar: "bar" }][0][_k];
|
||||
_l = foo(), bar4 = [{ bar: "bar" }][0][_l];
|
||||
_m = (1 + {}), bar4 = [{ bar: "bar" }][0][_m];
|
||||
var _g, _h, _j, _k, _l, _m;
|
||||
(_b = foo2(), bar3 = { bar: "bar" }[_b]);
|
||||
_c = foo, bar4 = [{ bar: "bar" }][0][_c];
|
||||
_d = foo2(), bar5 = [{ bar: "bar" }][0][_d];
|
||||
_e = foo(), bar4 = [{ bar: "bar" }][0][_e];
|
||||
_f = (1 + {}), bar4 = [{ bar: "bar" }][0][_f];
|
||||
|
||||
@@ -17,6 +17,7 @@ var v = {
|
||||
}
|
||||
|
||||
//// [computedPropertyNames10_ES5.js]
|
||||
var _a;
|
||||
var s;
|
||||
var n;
|
||||
var a;
|
||||
@@ -33,4 +34,3 @@ var v = (_a = {},
|
||||
_a["hello bye"] = function () { },
|
||||
_a["hello " + a + " bye"] = function () { },
|
||||
_a);
|
||||
var _a;
|
||||
|
||||
@@ -17,6 +17,7 @@ var v = {
|
||||
}
|
||||
|
||||
//// [computedPropertyNames11_ES5.js]
|
||||
var _a;
|
||||
var s;
|
||||
var n;
|
||||
var a;
|
||||
@@ -77,4 +78,3 @@ var v = (_a = {},
|
||||
configurable: true
|
||||
}),
|
||||
_a);
|
||||
var _a;
|
||||
|
||||
@@ -26,8 +26,8 @@ var C = /** @class */ (function () {
|
||||
this[_b] = 2;
|
||||
this["hello bye"] = 0;
|
||||
}
|
||||
var _a, _b, _c;
|
||||
_a = n, s + s, _b = s + n, +s, _c = "hello " + a + " bye";
|
||||
C[_c] = 0;
|
||||
return C;
|
||||
var _a, _b, _c;
|
||||
}());
|
||||
|
||||
@@ -17,6 +17,7 @@ class C {
|
||||
}
|
||||
|
||||
//// [computedPropertyNames12_ES6.js]
|
||||
var _a, _b, _c;
|
||||
var s;
|
||||
var n;
|
||||
var a;
|
||||
@@ -29,4 +30,3 @@ class C {
|
||||
}
|
||||
_a = n, s + s, _b = s + n, +s, _c = `hello ${a} bye`;
|
||||
C[_c] = 0;
|
||||
var _a, _b, _c;
|
||||
|
||||
@@ -7,8 +7,8 @@ function foo() {
|
||||
|
||||
//// [computedPropertyNames18_ES5.js]
|
||||
function foo() {
|
||||
var _a;
|
||||
var obj = (_a = {},
|
||||
_a[this.bar] = 0,
|
||||
_a);
|
||||
var _a;
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ module M {
|
||||
//// [computedPropertyNames19_ES5.js]
|
||||
var M;
|
||||
(function (M) {
|
||||
var _a;
|
||||
var obj = (_a = {},
|
||||
_a[this.bar] = 0,
|
||||
_a);
|
||||
var _a;
|
||||
})(M || (M = {}));
|
||||
|
||||
@@ -5,6 +5,7 @@ var v = {
|
||||
}
|
||||
|
||||
//// [computedPropertyNames1_ES5.js]
|
||||
var _a;
|
||||
var v = (_a = {},
|
||||
Object.defineProperty(_a, 0 + 1, {
|
||||
get: function () { return 0; },
|
||||
@@ -18,4 +19,3 @@ var v = (_a = {},
|
||||
configurable: true
|
||||
}),
|
||||
_a);
|
||||
var _a;
|
||||
|
||||
@@ -4,7 +4,7 @@ var obj = {
|
||||
}
|
||||
|
||||
//// [computedPropertyNames20_ES5.js]
|
||||
var _a;
|
||||
var obj = (_a = {},
|
||||
_a[this.bar] = 0,
|
||||
_a);
|
||||
var _a;
|
||||
|
||||
@@ -13,11 +13,11 @@ var C = /** @class */ (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype.bar = function () {
|
||||
var _a;
|
||||
var obj = (_a = {},
|
||||
_a[this.bar()] = function () { },
|
||||
_a);
|
||||
return 0;
|
||||
var _a;
|
||||
};
|
||||
return C;
|
||||
}());
|
||||
|
||||
@@ -10,6 +10,7 @@ class C {
|
||||
|
||||
//// [computedPropertyNames23_ES5.js]
|
||||
var C = /** @class */ (function () {
|
||||
var _a;
|
||||
function C() {
|
||||
}
|
||||
C.prototype.bar = function () {
|
||||
@@ -17,5 +18,4 @@ var C = /** @class */ (function () {
|
||||
};
|
||||
C.prototype[(_a = {}, _a[this.bar()] = 1, _a)[0]] = function () { };
|
||||
return C;
|
||||
var _a;
|
||||
}());
|
||||
|
||||
@@ -38,11 +38,11 @@ var C = /** @class */ (function (_super) {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
C.prototype.foo = function () {
|
||||
var _a;
|
||||
var obj = (_a = {},
|
||||
_a[_super.prototype.bar.call(this)] = function () { },
|
||||
_a);
|
||||
return 0;
|
||||
var _a;
|
||||
};
|
||||
return C;
|
||||
}(Base));
|
||||
|
||||
@@ -30,11 +30,11 @@ var Base = /** @class */ (function () {
|
||||
return Base;
|
||||
}());
|
||||
var C = /** @class */ (function (_super) {
|
||||
var _a;
|
||||
__extends(C, _super);
|
||||
function C() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
C.prototype[(_a = {}, _a[_super.bar.call(this)] = 1, _a)[0]] = function () { };
|
||||
return C;
|
||||
var _a;
|
||||
}(Base));
|
||||
|
||||
@@ -29,12 +29,12 @@ var Base = /** @class */ (function () {
|
||||
var C = /** @class */ (function (_super) {
|
||||
__extends(C, _super);
|
||||
function C() {
|
||||
var _a;
|
||||
var _this = _super.call(this) || this;
|
||||
var obj = (_a = {},
|
||||
_a[(_this = _super.call(this) || this, "prop")] = function () { },
|
||||
_a);
|
||||
return _this;
|
||||
var _a;
|
||||
}
|
||||
return C;
|
||||
}(Base));
|
||||
|
||||
@@ -17,11 +17,11 @@ var C = /** @class */ (function () {
|
||||
C.prototype.bar = function () {
|
||||
var _this = this;
|
||||
(function () {
|
||||
var _a;
|
||||
var obj = (_a = {},
|
||||
_a[_this.bar()] = function () { } // needs capture
|
||||
,
|
||||
_a);
|
||||
var _a;
|
||||
});
|
||||
return 0;
|
||||
};
|
||||
|
||||
@@ -36,13 +36,13 @@ var C = /** @class */ (function (_super) {
|
||||
function C() {
|
||||
var _this = _super.call(this) || this;
|
||||
(function () {
|
||||
var _a;
|
||||
var obj = (_a = {},
|
||||
// Ideally, we would capture this. But the reference is
|
||||
// illegal, and not capturing this is consistent with
|
||||
//treatment of other similar violations.
|
||||
_a[(_this = _super.call(this) || this, "prop")] = function () { },
|
||||
_a);
|
||||
var _a;
|
||||
});
|
||||
return _this;
|
||||
}
|
||||
|
||||
@@ -42,11 +42,11 @@ var C = /** @class */ (function (_super) {
|
||||
C.prototype.foo = function () {
|
||||
var _this = this;
|
||||
(function () {
|
||||
var _a;
|
||||
var obj = (_a = {},
|
||||
_a[_super.prototype.bar.call(_this)] = function () { } // needs capture
|
||||
,
|
||||
_a);
|
||||
var _a;
|
||||
});
|
||||
return 0;
|
||||
};
|
||||
|
||||
@@ -15,11 +15,11 @@ var C = /** @class */ (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype.bar = function () {
|
||||
var _a;
|
||||
var obj = (_a = {},
|
||||
_a[foo()] = function () { },
|
||||
_a);
|
||||
return 0;
|
||||
var _a;
|
||||
};
|
||||
return C;
|
||||
}());
|
||||
|
||||
@@ -15,11 +15,11 @@ var C = /** @class */ (function () {
|
||||
function C() {
|
||||
}
|
||||
C.bar = function () {
|
||||
var _a;
|
||||
var obj = (_a = {},
|
||||
_a[foo()] = function () { },
|
||||
_a);
|
||||
return 0;
|
||||
var _a;
|
||||
};
|
||||
return C;
|
||||
}());
|
||||
|
||||
@@ -4,7 +4,7 @@ var o = {
|
||||
};
|
||||
|
||||
//// [computedPropertyNames46_ES5.js]
|
||||
var _a;
|
||||
var o = (_a = {},
|
||||
_a["" || 0] = 0,
|
||||
_a);
|
||||
var _a;
|
||||
|
||||
@@ -6,6 +6,7 @@ var o = {
|
||||
};
|
||||
|
||||
//// [computedPropertyNames47_ES5.js]
|
||||
var _a;
|
||||
var E1;
|
||||
(function (E1) {
|
||||
E1[E1["x"] = 0] = "x";
|
||||
@@ -17,4 +18,3 @@ var E2;
|
||||
var o = (_a = {},
|
||||
_a[E1.x || E2.x] = 0,
|
||||
_a);
|
||||
var _a;
|
||||
|
||||
@@ -18,6 +18,7 @@ extractIndexer({
|
||||
}); // Should return any (widened form of undefined)
|
||||
|
||||
//// [computedPropertyNames48_ES5.js]
|
||||
var _a, _b, _c;
|
||||
var E;
|
||||
(function (E) {
|
||||
E[E["x"] = 0] = "x";
|
||||
@@ -32,4 +33,3 @@ extractIndexer((_b = {},
|
||||
extractIndexer((_c = {},
|
||||
_c["" || 0] = "",
|
||||
_c)); // Should return any (widened form of undefined)
|
||||
var _a, _b, _c;
|
||||
|
||||
@@ -25,6 +25,7 @@ var x = {
|
||||
}
|
||||
|
||||
//// [computedPropertyNames49_ES5.js]
|
||||
var _a;
|
||||
var x = (_a = {
|
||||
p1: 10
|
||||
},
|
||||
@@ -61,4 +62,3 @@ var x = (_a = {
|
||||
}),
|
||||
_a.p2 = 20,
|
||||
_a);
|
||||
var _a;
|
||||
|
||||
@@ -17,6 +17,7 @@ var v = {
|
||||
}
|
||||
|
||||
//// [computedPropertyNames4_ES5.js]
|
||||
var _a;
|
||||
var s;
|
||||
var n;
|
||||
var a;
|
||||
@@ -33,4 +34,3 @@ var v = (_a = {},
|
||||
_a["hello bye"] = 0,
|
||||
_a["hello " + a + " bye"] = 0,
|
||||
_a);
|
||||
var _a;
|
||||
|
||||
@@ -25,6 +25,7 @@ var x = {
|
||||
}
|
||||
|
||||
//// [computedPropertyNames50_ES5.js]
|
||||
var _a;
|
||||
var x = (_a = {
|
||||
p1: 10,
|
||||
get foo() {
|
||||
@@ -57,4 +58,3 @@ var x = (_a = {
|
||||
}),
|
||||
_a.p2 = 20,
|
||||
_a);
|
||||
var _a;
|
||||
|
||||
@@ -11,11 +11,11 @@ function f<T, K extends keyof T>() {
|
||||
|
||||
//// [computedPropertyNames51_ES5.js]
|
||||
function f() {
|
||||
var _a;
|
||||
var t;
|
||||
var k;
|
||||
var v = (_a = {},
|
||||
_a[t] = 0,
|
||||
_a[k] = 1,
|
||||
_a);
|
||||
var _a;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ var v = {
|
||||
}
|
||||
|
||||
//// [computedPropertyNames5_ES5.js]
|
||||
var _a;
|
||||
var b;
|
||||
var v = (_a = {},
|
||||
_a[b] = 0,
|
||||
@@ -19,4 +20,3 @@ var v = (_a = {},
|
||||
_a[undefined] = undefined,
|
||||
_a[null] = null,
|
||||
_a);
|
||||
var _a;
|
||||
|
||||
@@ -9,6 +9,7 @@ var v = {
|
||||
}
|
||||
|
||||
//// [computedPropertyNames6_ES5.js]
|
||||
var _a;
|
||||
var p1;
|
||||
var p2;
|
||||
var p3;
|
||||
@@ -17,4 +18,3 @@ var v = (_a = {},
|
||||
_a[p2] = 1,
|
||||
_a[p3] = 2,
|
||||
_a);
|
||||
var _a;
|
||||
|
||||
@@ -7,6 +7,7 @@ var v = {
|
||||
}
|
||||
|
||||
//// [computedPropertyNames7_ES5.js]
|
||||
var _a;
|
||||
var E;
|
||||
(function (E) {
|
||||
E[E["member"] = 0] = "member";
|
||||
@@ -14,4 +15,3 @@ var E;
|
||||
var v = (_a = {},
|
||||
_a[E.member] = 0,
|
||||
_a);
|
||||
var _a;
|
||||
|
||||
@@ -10,11 +10,11 @@ function f<T, U extends string>() {
|
||||
|
||||
//// [computedPropertyNames8_ES5.js]
|
||||
function f() {
|
||||
var _a;
|
||||
var t;
|
||||
var u;
|
||||
var v = (_a = {},
|
||||
_a[t] = 0,
|
||||
_a[u] = 1,
|
||||
_a);
|
||||
var _a;
|
||||
}
|
||||
|
||||
@@ -11,10 +11,10 @@ var v = {
|
||||
}
|
||||
|
||||
//// [computedPropertyNames9_ES5.js]
|
||||
var _a;
|
||||
function f(x) { }
|
||||
var v = (_a = {},
|
||||
_a[f("")] = 0,
|
||||
_a[f(0)] = 0,
|
||||
_a[f(true)] = 0,
|
||||
_a);
|
||||
var _a;
|
||||
|
||||
@@ -9,8 +9,8 @@ var o: I = {
|
||||
}
|
||||
|
||||
//// [computedPropertyNamesContextualType10_ES5.js]
|
||||
var _a;
|
||||
var o = (_a = {},
|
||||
_a[+"foo"] = "",
|
||||
_a[+"bar"] = 0,
|
||||
_a);
|
||||
var _a;
|
||||
|
||||
@@ -10,8 +10,8 @@ var o: I = {
|
||||
}
|
||||
|
||||
//// [computedPropertyNamesContextualType1_ES5.js]
|
||||
var _a;
|
||||
var o = (_a = {},
|
||||
_a["" + 0] = function (y) { return y.length; },
|
||||
_a["" + 1] = function (y) { return y.length; },
|
||||
_a);
|
||||
var _a;
|
||||
|
||||
@@ -10,8 +10,8 @@ var o: I = {
|
||||
}
|
||||
|
||||
//// [computedPropertyNamesContextualType2_ES5.js]
|
||||
var _a;
|
||||
var o = (_a = {},
|
||||
_a[+"foo"] = function (y) { return y.length; },
|
||||
_a[+"bar"] = function (y) { return y.length; },
|
||||
_a);
|
||||
var _a;
|
||||
|
||||
@@ -9,8 +9,8 @@ var o: I = {
|
||||
}
|
||||
|
||||
//// [computedPropertyNamesContextualType3_ES5.js]
|
||||
var _a;
|
||||
var o = (_a = {},
|
||||
_a[+"foo"] = function (y) { return y.length; },
|
||||
_a[+"bar"] = function (y) { return y.length; },
|
||||
_a);
|
||||
var _a;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user