many changes
new feature to record both sides while call recording(upstream commit), fix armv7 failed to initialize error & fix a9 issues
This commit is contained in:
96
valdi/node_modules/typescript/lib/_tsc.js
generated
vendored
96
valdi/node_modules/typescript/lib/_tsc.js
generated
vendored
@@ -3182,7 +3182,7 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => {
|
||||
SyntaxKind4[SyntaxKind4["WhileStatement"] = 248] = "WhileStatement";
|
||||
SyntaxKind4[SyntaxKind4["ForStatement"] = 249] = "ForStatement";
|
||||
SyntaxKind4[SyntaxKind4["ForInStatement"] = 250] = "ForInStatement";
|
||||
SyntaxKind4[SyntaxKind4["ForOfStatement"] = 251] = "ForOfStatement";
|
||||
SyntaxKind4[SyntaxKind4["ForOfStatement"] = 252] = "ForOfStatement";
|
||||
SyntaxKind4[SyntaxKind4["ContinueStatement"] = 252] = "ContinueStatement";
|
||||
SyntaxKind4[SyntaxKind4["BreakStatement"] = 253] = "BreakStatement";
|
||||
SyntaxKind4[SyntaxKind4["ReturnStatement"] = 254] = "ReturnStatement";
|
||||
@@ -12315,7 +12315,7 @@ function isIterationStatement(node, lookInLabeledStatements) {
|
||||
switch (node.kind) {
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 247 /* DoStatement */:
|
||||
case 248 /* WhileStatement */:
|
||||
return true;
|
||||
@@ -12337,7 +12337,7 @@ function isExternalModuleIndicator(result) {
|
||||
return isAnyImportOrReExport(result) || isExportAssignment(result) || hasSyntacticModifier(result, 32 /* Export */);
|
||||
}
|
||||
function isForInOrOfStatement(node) {
|
||||
return node.kind === 250 /* ForInStatement */ || node.kind === 251 /* ForOfStatement */;
|
||||
return node.kind === 250 /* ForInStatement */ || node.kind === 252 /* ForOfStatement */;
|
||||
}
|
||||
function isConciseBody(node) {
|
||||
return isBlock(node) || isExpression(node);
|
||||
@@ -12441,7 +12441,7 @@ function canHaveLocals(node) {
|
||||
case 181 /* ConstructSignature */:
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 263 /* FunctionDeclaration */:
|
||||
case 219 /* FunctionExpression */:
|
||||
case 185 /* FunctionType */:
|
||||
@@ -12471,7 +12471,7 @@ function isDeclarationStatementKind(kind) {
|
||||
return kind === 263 /* FunctionDeclaration */ || kind === 283 /* MissingDeclaration */ || kind === 264 /* ClassDeclaration */ || kind === 265 /* InterfaceDeclaration */ || kind === 266 /* TypeAliasDeclaration */ || kind === 267 /* EnumDeclaration */ || kind === 268 /* ModuleDeclaration */ || kind === 273 /* ImportDeclaration */ || kind === 272 /* ImportEqualsDeclaration */ || kind === 279 /* ExportDeclaration */ || kind === 278 /* ExportAssignment */ || kind === 271 /* NamespaceExportDeclaration */;
|
||||
}
|
||||
function isStatementKindButNotDeclarationKind(kind) {
|
||||
return kind === 253 /* BreakStatement */ || kind === 252 /* ContinueStatement */ || kind === 260 /* DebuggerStatement */ || kind === 247 /* DoStatement */ || kind === 245 /* ExpressionStatement */ || kind === 243 /* EmptyStatement */ || kind === 250 /* ForInStatement */ || kind === 251 /* ForOfStatement */ || kind === 249 /* ForStatement */ || kind === 246 /* IfStatement */ || kind === 257 /* LabeledStatement */ || kind === 254 /* ReturnStatement */ || kind === 256 /* SwitchStatement */ || kind === 258 /* ThrowStatement */ || kind === 259 /* TryStatement */ || kind === 244 /* VariableStatement */ || kind === 248 /* WhileStatement */ || kind === 255 /* WithStatement */ || kind === 354 /* NotEmittedStatement */;
|
||||
return kind === 253 /* BreakStatement */ || kind === 252 /* ContinueStatement */ || kind === 260 /* DebuggerStatement */ || kind === 247 /* DoStatement */ || kind === 245 /* ExpressionStatement */ || kind === 243 /* EmptyStatement */ || kind === 250 /* ForInStatement */ || kind === 252 /* ForOfStatement */ || kind === 249 /* ForStatement */ || kind === 246 /* IfStatement */ || kind === 257 /* LabeledStatement */ || kind === 254 /* ReturnStatement */ || kind === 256 /* SwitchStatement */ || kind === 258 /* ThrowStatement */ || kind === 259 /* TryStatement */ || kind === 244 /* VariableStatement */ || kind === 248 /* WhileStatement */ || kind === 255 /* WithStatement */ || kind === 354 /* NotEmittedStatement */;
|
||||
}
|
||||
function isDeclaration(node) {
|
||||
if (node.kind === 169 /* TypeParameter */) {
|
||||
@@ -12897,7 +12897,7 @@ function isStatementWithLocals(node) {
|
||||
case 270 /* CaseBlock */:
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -13754,7 +13754,7 @@ function isBlockScope(node, parentNode) {
|
||||
case 268 /* ModuleDeclaration */:
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 177 /* Constructor */:
|
||||
case 175 /* MethodDeclaration */:
|
||||
case 178 /* GetAccessor */:
|
||||
@@ -14248,7 +14248,7 @@ function forEachReturnStatement(body, visitor) {
|
||||
case 248 /* WhileStatement */:
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 255 /* WithStatement */:
|
||||
case 256 /* SwitchStatement */:
|
||||
case 297 /* CaseClause */:
|
||||
@@ -14791,7 +14791,7 @@ function isInExpressionContext(node) {
|
||||
const forStatement = parent;
|
||||
return forStatement.initializer === node && forStatement.initializer.kind !== 262 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node;
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
const forInOrOfStatement = parent;
|
||||
return forInOrOfStatement.initializer === node && forInOrOfStatement.initializer.kind !== 262 /* VariableDeclarationList */ || forInOrOfStatement.expression === node;
|
||||
case 217 /* TypeAssertionExpression */:
|
||||
@@ -15325,7 +15325,7 @@ function canHaveJSDoc(node) {
|
||||
case 282 /* ExportSpecifier */:
|
||||
case 245 /* ExpressionStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 249 /* ForStatement */:
|
||||
case 263 /* FunctionDeclaration */:
|
||||
case 219 /* FunctionExpression */:
|
||||
@@ -15489,7 +15489,7 @@ function getAssignmentTarget(node) {
|
||||
const unaryOperator = unaryExpression.operator;
|
||||
return unaryOperator === 46 /* PlusPlusToken */ || unaryOperator === 47 /* MinusMinusToken */ ? unaryExpression : void 0;
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
const forInOrOfStatement = parent;
|
||||
return forInOrOfStatement.initializer === node ? forInOrOfStatement : void 0;
|
||||
case 218 /* ParenthesizedExpression */:
|
||||
@@ -15532,7 +15532,7 @@ function getAssignmentTargetKind(node) {
|
||||
case 226 /* PostfixUnaryExpression */:
|
||||
return 2 /* Compound */;
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return 1 /* Definite */;
|
||||
}
|
||||
}
|
||||
@@ -15564,7 +15564,7 @@ function isNodeWithPossibleHoistedDeclaration(node) {
|
||||
case 257 /* LabeledStatement */:
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 247 /* DoStatement */:
|
||||
case 248 /* WhileStatement */:
|
||||
case 259 /* TryStatement */:
|
||||
@@ -17424,7 +17424,7 @@ function accessKind(node) {
|
||||
case 210 /* ArrayLiteralExpression */:
|
||||
return accessKind(parent);
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return node === parent.initializer ? 1 /* Write */ : 0 /* Read */;
|
||||
default:
|
||||
return 0 /* Read */;
|
||||
@@ -23083,7 +23083,7 @@ function createNodeFactory(flags, baseFactory2) {
|
||||
return node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForInStatement(initializer, expression, statement), node) : node;
|
||||
}
|
||||
function createForOfStatement(awaitModifier, initializer, expression, statement) {
|
||||
const node = createBaseNode(251 /* ForOfStatement */);
|
||||
const node = createBaseNode(252 /* ForOfStatement */);
|
||||
node.awaitModifier = awaitModifier;
|
||||
node.initializer = initializer;
|
||||
node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
|
||||
@@ -26810,7 +26810,7 @@ function isForInStatement(node) {
|
||||
return node.kind === 250 /* ForInStatement */;
|
||||
}
|
||||
function isForOfStatement(node) {
|
||||
return node.kind === 251 /* ForOfStatement */;
|
||||
return node.kind === 252 /* ForOfStatement */;
|
||||
}
|
||||
function isReturnStatement(node) {
|
||||
return node.kind === 254 /* ReturnStatement */;
|
||||
@@ -28447,7 +28447,7 @@ var forEachChildTable = {
|
||||
[250 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) {
|
||||
return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement);
|
||||
},
|
||||
[251 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) {
|
||||
[252 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) {
|
||||
return visitNode2(cbNode, node.awaitModifier) || visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement);
|
||||
},
|
||||
[252 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement,
|
||||
@@ -30220,7 +30220,7 @@ var Parser;
|
||||
case 253 /* BreakStatement */:
|
||||
case 252 /* ContinueStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 249 /* ForStatement */:
|
||||
case 248 /* WhileStatement */:
|
||||
case 255 /* WithStatement */:
|
||||
@@ -42754,7 +42754,7 @@ function createBinder() {
|
||||
bindForStatement(node);
|
||||
break;
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
bindForInOrForOfStatement(node);
|
||||
break;
|
||||
case 246 /* IfStatement */:
|
||||
@@ -43144,7 +43144,7 @@ function createBinder() {
|
||||
bind(node.expression);
|
||||
addAntecedent(preLoopLabel, currentFlow);
|
||||
currentFlow = preLoopLabel;
|
||||
if (node.kind === 251 /* ForOfStatement */) {
|
||||
if (node.kind === 252 /* ForOfStatement */) {
|
||||
bind(node.awaitModifier);
|
||||
}
|
||||
addAntecedent(postLoopLabel, currentFlow);
|
||||
@@ -45137,7 +45137,7 @@ function getContainerFlags(node) {
|
||||
case 300 /* CatchClause */:
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 270 /* CaseBlock */:
|
||||
return 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */;
|
||||
case 242 /* Block */:
|
||||
@@ -47938,7 +47938,7 @@ function createTypeChecker(host) {
|
||||
switch (declaration2.parent.parent.kind) {
|
||||
case 244 /* VariableStatement */:
|
||||
case 249 /* ForStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
if (isSameScopeDescendentOf(usage2, declaration2, declContainer)) {
|
||||
return true;
|
||||
}
|
||||
@@ -55950,7 +55950,7 @@ function createTypeChecker(host) {
|
||||
)));
|
||||
return indexType.flags & (262144 /* TypeParameter */ | 4194304 /* Index */) ? getExtractStringType(indexType) : stringType;
|
||||
}
|
||||
if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 251 /* ForOfStatement */) {
|
||||
if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 252 /* ForOfStatement */) {
|
||||
const forOfStatement = declaration.parent.parent;
|
||||
return checkRightHandSideOfForOf(forOfStatement) || anyType;
|
||||
}
|
||||
@@ -69719,7 +69719,7 @@ function createTypeChecker(host) {
|
||||
return isDestructuringDefaultAssignment ? getTypeWithDefault(getAssignedType(node), node.right) : getTypeOfExpression(node.right);
|
||||
}
|
||||
function isDestructuringAssignmentTarget(parent) {
|
||||
return parent.parent.kind === 227 /* BinaryExpression */ && parent.parent.left === parent || parent.parent.kind === 251 /* ForOfStatement */ && parent.parent.initializer === parent;
|
||||
return parent.parent.kind === 227 /* BinaryExpression */ && parent.parent.left === parent || parent.parent.kind === 252 /* ForOfStatement */ && parent.parent.initializer === parent;
|
||||
}
|
||||
function getAssignedTypeOfArrayLiteralElement(node, element) {
|
||||
return getTypeOfDestructuredArrayElement(getAssignedType(node), node.elements.indexOf(element));
|
||||
@@ -69738,7 +69738,7 @@ function createTypeChecker(host) {
|
||||
switch (parent.kind) {
|
||||
case 250 /* ForInStatement */:
|
||||
return stringType;
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return checkRightHandSideOfForOf(parent) || errorType;
|
||||
case 227 /* BinaryExpression */:
|
||||
return getAssignedTypeOfBinaryExpression(parent);
|
||||
@@ -69772,7 +69772,7 @@ function createTypeChecker(host) {
|
||||
if (node.parent.parent.kind === 250 /* ForInStatement */) {
|
||||
return stringType;
|
||||
}
|
||||
if (node.parent.parent.kind === 251 /* ForOfStatement */) {
|
||||
if (node.parent.parent.kind === 252 /* ForOfStatement */) {
|
||||
return checkRightHandSideOfForOf(node.parent.parent) || errorType;
|
||||
}
|
||||
return errorType;
|
||||
@@ -70010,7 +70010,7 @@ function createTypeChecker(host) {
|
||||
if (isDeclarationWithExplicitTypeAnnotation(declaration)) {
|
||||
return getTypeOfSymbol(symbol);
|
||||
}
|
||||
if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 251 /* ForOfStatement */) {
|
||||
if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 252 /* ForOfStatement */) {
|
||||
const statement = declaration.parent.parent;
|
||||
const expressionType = getTypeOfDottedName(
|
||||
statement.expression,
|
||||
@@ -71449,7 +71449,7 @@ function createTypeChecker(host) {
|
||||
case 248 /* WhileStatement */:
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 255 /* WithStatement */:
|
||||
case 256 /* SwitchStatement */:
|
||||
case 259 /* TryStatement */:
|
||||
@@ -82766,7 +82766,7 @@ function createTypeChecker(host) {
|
||||
case 270 /* CaseBlock */:
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
checkUnusedLocalsAndParameters(node, addDiagnostic);
|
||||
break;
|
||||
case 177 /* Constructor */:
|
||||
@@ -86503,7 +86503,7 @@ function createTypeChecker(host) {
|
||||
return checkForStatement(node);
|
||||
case 250 /* ForInStatement */:
|
||||
return checkForInStatement(node);
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return checkForOfStatement(node);
|
||||
case 252 /* ContinueStatement */:
|
||||
case 253 /* BreakStatement */:
|
||||
@@ -87497,7 +87497,7 @@ function createTypeChecker(host) {
|
||||
}
|
||||
function getTypeOfAssignmentPattern(expr) {
|
||||
Debug.assert(expr.kind === 211 /* ObjectLiteralExpression */ || expr.kind === 210 /* ArrayLiteralExpression */);
|
||||
if (expr.parent.kind === 251 /* ForOfStatement */) {
|
||||
if (expr.parent.kind === 252 /* ForOfStatement */) {
|
||||
const iteratedType = checkRightHandSideOfForOf(expr.parent);
|
||||
return checkDestructuringAssignment(expr, iteratedType || errorType);
|
||||
}
|
||||
@@ -89489,7 +89489,7 @@ function createTypeChecker(host) {
|
||||
if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) {
|
||||
return true;
|
||||
}
|
||||
if (forInOrOfStatement.kind === 251 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) {
|
||||
if (forInOrOfStatement.kind === 252 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) {
|
||||
if (!(forInOrOfStatement.flags & 65536 /* AwaitContext */)) {
|
||||
const sourceFile = getSourceFileOfNode(forInOrOfStatement);
|
||||
if (isInTopLevelContext(forInOrOfStatement)) {
|
||||
@@ -89798,7 +89798,7 @@ function createTypeChecker(host) {
|
||||
return grammarErrorOnNode(node, Diagnostics._0_declarations_may_not_have_binding_patterns, "using");
|
||||
}
|
||||
}
|
||||
if (node.parent.parent.kind !== 250 /* ForInStatement */ && node.parent.parent.kind !== 251 /* ForOfStatement */) {
|
||||
if (node.parent.parent.kind !== 250 /* ForInStatement */ && node.parent.parent.kind !== 252 /* ForOfStatement */) {
|
||||
if (nodeFlags & 33554432 /* Ambient */) {
|
||||
checkAmbientInitializer(node);
|
||||
} else if (!node.initializer) {
|
||||
@@ -89890,7 +89890,7 @@ function createTypeChecker(host) {
|
||||
case 255 /* WithStatement */:
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return false;
|
||||
case 257 /* LabeledStatement */:
|
||||
return allowBlockDeclarations(parent.parent);
|
||||
@@ -91350,7 +91350,7 @@ var visitEachChildTable = {
|
||||
visitIterationBody(node.statement, visitor, context, nodeVisitor)
|
||||
);
|
||||
},
|
||||
[251 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
||||
[252 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
||||
return context.factory.updateForOfStatement(
|
||||
node,
|
||||
tokenVisitor ? nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword) : node.awaitModifier,
|
||||
@@ -100339,7 +100339,7 @@ function transformES2017(context) {
|
||||
return visitForStatementInAsyncBody(node);
|
||||
case 250 /* ForInStatement */:
|
||||
return visitForInStatementInAsyncBody(node);
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return visitForOfStatementInAsyncBody(node);
|
||||
case 300 /* CatchClause */:
|
||||
return visitCatchClauseInAsyncBody(node);
|
||||
@@ -101193,7 +101193,7 @@ function transformES2018(context) {
|
||||
0 /* IterationStatementExcludes */,
|
||||
2 /* IterationStatementIncludes */
|
||||
);
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return visitForOfStatement(
|
||||
node,
|
||||
/*outermostLabeledStatement*/
|
||||
@@ -101364,7 +101364,7 @@ function transformES2018(context) {
|
||||
function visitLabeledStatement(node) {
|
||||
if (enclosingFunctionFlags & 2 /* Async */) {
|
||||
const statement = unwrapInnermostStatementOfLabel(node);
|
||||
if (statement.kind === 251 /* ForOfStatement */ && statement.awaitModifier) {
|
||||
if (statement.kind === 252 /* ForOfStatement */ && statement.awaitModifier) {
|
||||
return visitForOfStatement(statement, node);
|
||||
}
|
||||
return factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node);
|
||||
@@ -102705,7 +102705,7 @@ function transformESNext(context) {
|
||||
return visitBlock(node);
|
||||
case 249 /* ForStatement */:
|
||||
return visitForStatement(node);
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return visitForOfStatement(node);
|
||||
case 256 /* SwitchStatement */:
|
||||
return visitSwitchStatement(node);
|
||||
@@ -103943,7 +103943,7 @@ var entities = new Map(Object.entries({
|
||||
oslash: 248,
|
||||
ugrave: 249,
|
||||
uacute: 250,
|
||||
ucirc: 251,
|
||||
ucirc: 252,
|
||||
uuml: 252,
|
||||
yacute: 253,
|
||||
thorn: 254,
|
||||
@@ -104369,7 +104369,7 @@ function transformES2015(context) {
|
||||
/*outermostLabeledStatement*/
|
||||
void 0
|
||||
);
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return visitForOfStatement(
|
||||
node,
|
||||
/*outermostLabeledStatement*/
|
||||
@@ -105979,7 +105979,7 @@ function transformES2015(context) {
|
||||
return visitForStatement(node, outermostLabeledStatement);
|
||||
case 250 /* ForInStatement */:
|
||||
return visitForInStatement(node, outermostLabeledStatement);
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return visitForOfStatement(node, outermostLabeledStatement);
|
||||
}
|
||||
}
|
||||
@@ -106453,7 +106453,7 @@ function transformES2015(context) {
|
||||
return convertForStatement(node, initializerFunction, convertedLoopBody);
|
||||
case 250 /* ForInStatement */:
|
||||
return convertForInStatement(node, convertedLoopBody);
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return convertForOfStatement(node, convertedLoopBody);
|
||||
case 247 /* DoStatement */:
|
||||
return convertDoStatement(node, convertedLoopBody);
|
||||
@@ -106511,7 +106511,7 @@ function transformES2015(context) {
|
||||
switch (node.kind) {
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
const initializer = node.initializer;
|
||||
if (initializer && initializer.kind === 262 /* VariableDeclarationList */) {
|
||||
loopInitializer = initializer;
|
||||
@@ -110048,7 +110048,7 @@ function transformModule(context) {
|
||||
);
|
||||
case 250 /* ForInStatement */:
|
||||
return visitForInStatement(node);
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return visitForOfStatement(node);
|
||||
case 247 /* DoStatement */:
|
||||
return visitDoStatement(node);
|
||||
@@ -112320,7 +112320,7 @@ function transformSystemModule(context) {
|
||||
);
|
||||
case 250 /* ForInStatement */:
|
||||
return visitForInStatement(node);
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return visitForOfStatement(node);
|
||||
case 247 /* DoStatement */:
|
||||
return visitDoStatement(node);
|
||||
@@ -116842,7 +116842,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
||||
return emitForStatement(node);
|
||||
case 250 /* ForInStatement */:
|
||||
return emitForInStatement(node);
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return emitForOfStatement(node);
|
||||
case 252 /* ContinueStatement */:
|
||||
return emitContinueStatement(node);
|
||||
@@ -119983,7 +119983,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
||||
generateNames(node.elseStatement);
|
||||
break;
|
||||
case 249 /* ForStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
generateNames(node.initializer);
|
||||
generateNames(node.statement);
|
||||
|
||||
2
valdi/node_modules/typescript/lib/typescript.d.ts
generated
vendored
2
valdi/node_modules/typescript/lib/typescript.d.ts
generated
vendored
@@ -3927,7 +3927,7 @@ declare namespace ts {
|
||||
WhileStatement = 248,
|
||||
ForStatement = 249,
|
||||
ForInStatement = 250,
|
||||
ForOfStatement = 251,
|
||||
ForOfStatement = 252,
|
||||
ContinueStatement = 252,
|
||||
BreakStatement = 253,
|
||||
ReturnStatement = 254,
|
||||
|
||||
136
valdi/node_modules/typescript/lib/typescript.js
generated
vendored
136
valdi/node_modules/typescript/lib/typescript.js
generated
vendored
@@ -5771,7 +5771,7 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => {
|
||||
SyntaxKind5[SyntaxKind5["WhileStatement"] = 248] = "WhileStatement";
|
||||
SyntaxKind5[SyntaxKind5["ForStatement"] = 249] = "ForStatement";
|
||||
SyntaxKind5[SyntaxKind5["ForInStatement"] = 250] = "ForInStatement";
|
||||
SyntaxKind5[SyntaxKind5["ForOfStatement"] = 251] = "ForOfStatement";
|
||||
SyntaxKind5[SyntaxKind5["ForOfStatement"] = 252] = "ForOfStatement";
|
||||
SyntaxKind5[SyntaxKind5["ContinueStatement"] = 252] = "ContinueStatement";
|
||||
SyntaxKind5[SyntaxKind5["BreakStatement"] = 253] = "BreakStatement";
|
||||
SyntaxKind5[SyntaxKind5["ReturnStatement"] = 254] = "ReturnStatement";
|
||||
@@ -15881,7 +15881,7 @@ function isIterationStatement(node, lookInLabeledStatements) {
|
||||
switch (node.kind) {
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 247 /* DoStatement */:
|
||||
case 248 /* WhileStatement */:
|
||||
return true;
|
||||
@@ -15903,7 +15903,7 @@ function isExternalModuleIndicator(result) {
|
||||
return isAnyImportOrReExport(result) || isExportAssignment(result) || hasSyntacticModifier(result, 32 /* Export */);
|
||||
}
|
||||
function isForInOrOfStatement(node) {
|
||||
return node.kind === 250 /* ForInStatement */ || node.kind === 251 /* ForOfStatement */;
|
||||
return node.kind === 250 /* ForInStatement */ || node.kind === 252 /* ForOfStatement */;
|
||||
}
|
||||
function isConciseBody(node) {
|
||||
return isBlock(node) || isExpression(node);
|
||||
@@ -16018,7 +16018,7 @@ function canHaveLocals(node) {
|
||||
case 181 /* ConstructSignature */:
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 263 /* FunctionDeclaration */:
|
||||
case 219 /* FunctionExpression */:
|
||||
case 185 /* FunctionType */:
|
||||
@@ -16048,7 +16048,7 @@ function isDeclarationStatementKind(kind) {
|
||||
return kind === 263 /* FunctionDeclaration */ || kind === 283 /* MissingDeclaration */ || kind === 264 /* ClassDeclaration */ || kind === 265 /* InterfaceDeclaration */ || kind === 266 /* TypeAliasDeclaration */ || kind === 267 /* EnumDeclaration */ || kind === 268 /* ModuleDeclaration */ || kind === 273 /* ImportDeclaration */ || kind === 272 /* ImportEqualsDeclaration */ || kind === 279 /* ExportDeclaration */ || kind === 278 /* ExportAssignment */ || kind === 271 /* NamespaceExportDeclaration */;
|
||||
}
|
||||
function isStatementKindButNotDeclarationKind(kind) {
|
||||
return kind === 253 /* BreakStatement */ || kind === 252 /* ContinueStatement */ || kind === 260 /* DebuggerStatement */ || kind === 247 /* DoStatement */ || kind === 245 /* ExpressionStatement */ || kind === 243 /* EmptyStatement */ || kind === 250 /* ForInStatement */ || kind === 251 /* ForOfStatement */ || kind === 249 /* ForStatement */ || kind === 246 /* IfStatement */ || kind === 257 /* LabeledStatement */ || kind === 254 /* ReturnStatement */ || kind === 256 /* SwitchStatement */ || kind === 258 /* ThrowStatement */ || kind === 259 /* TryStatement */ || kind === 244 /* VariableStatement */ || kind === 248 /* WhileStatement */ || kind === 255 /* WithStatement */ || kind === 354 /* NotEmittedStatement */;
|
||||
return kind === 253 /* BreakStatement */ || kind === 252 /* ContinueStatement */ || kind === 260 /* DebuggerStatement */ || kind === 247 /* DoStatement */ || kind === 245 /* ExpressionStatement */ || kind === 243 /* EmptyStatement */ || kind === 250 /* ForInStatement */ || kind === 252 /* ForOfStatement */ || kind === 249 /* ForStatement */ || kind === 246 /* IfStatement */ || kind === 257 /* LabeledStatement */ || kind === 254 /* ReturnStatement */ || kind === 256 /* SwitchStatement */ || kind === 258 /* ThrowStatement */ || kind === 259 /* TryStatement */ || kind === 244 /* VariableStatement */ || kind === 248 /* WhileStatement */ || kind === 255 /* WithStatement */ || kind === 354 /* NotEmittedStatement */;
|
||||
}
|
||||
function isDeclaration(node) {
|
||||
if (node.kind === 169 /* TypeParameter */) {
|
||||
@@ -16490,7 +16490,7 @@ function isStatementWithLocals(node) {
|
||||
case 270 /* CaseBlock */:
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -17395,7 +17395,7 @@ function isBlockScope(node, parentNode) {
|
||||
case 268 /* ModuleDeclaration */:
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 177 /* Constructor */:
|
||||
case 175 /* MethodDeclaration */:
|
||||
case 178 /* GetAccessor */:
|
||||
@@ -17935,7 +17935,7 @@ function forEachReturnStatement(body, visitor) {
|
||||
case 248 /* WhileStatement */:
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 255 /* WithStatement */:
|
||||
case 256 /* SwitchStatement */:
|
||||
case 297 /* CaseClause */:
|
||||
@@ -18481,7 +18481,7 @@ function isInExpressionContext(node) {
|
||||
const forStatement = parent2;
|
||||
return forStatement.initializer === node && forStatement.initializer.kind !== 262 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node;
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
const forInOrOfStatement = parent2;
|
||||
return forInOrOfStatement.initializer === node && forInOrOfStatement.initializer.kind !== 262 /* VariableDeclarationList */ || forInOrOfStatement.expression === node;
|
||||
case 217 /* TypeAssertionExpression */:
|
||||
@@ -19051,7 +19051,7 @@ function canHaveJSDoc(node) {
|
||||
case 282 /* ExportSpecifier */:
|
||||
case 245 /* ExpressionStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 249 /* ForStatement */:
|
||||
case 263 /* FunctionDeclaration */:
|
||||
case 219 /* FunctionExpression */:
|
||||
@@ -19224,7 +19224,7 @@ function getAssignmentTarget(node) {
|
||||
const unaryOperator = unaryExpression.operator;
|
||||
return unaryOperator === 46 /* PlusPlusToken */ || unaryOperator === 47 /* MinusMinusToken */ ? unaryExpression : void 0;
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
const forInOrOfStatement = parent2;
|
||||
return forInOrOfStatement.initializer === node ? forInOrOfStatement : void 0;
|
||||
case 218 /* ParenthesizedExpression */:
|
||||
@@ -19267,7 +19267,7 @@ function getAssignmentTargetKind(node) {
|
||||
case 226 /* PostfixUnaryExpression */:
|
||||
return 2 /* Compound */;
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return 1 /* Definite */;
|
||||
}
|
||||
}
|
||||
@@ -19299,7 +19299,7 @@ function isNodeWithPossibleHoistedDeclaration(node) {
|
||||
case 257 /* LabeledStatement */:
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 247 /* DoStatement */:
|
||||
case 248 /* WhileStatement */:
|
||||
case 259 /* TryStatement */:
|
||||
@@ -21316,7 +21316,7 @@ function accessKind(node) {
|
||||
case 210 /* ArrayLiteralExpression */:
|
||||
return accessKind(parent2);
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return node === parent2.initializer ? 1 /* Write */ : 0 /* Read */;
|
||||
default:
|
||||
return 0 /* Read */;
|
||||
@@ -23389,7 +23389,7 @@ function isSourceElement(node) {
|
||||
case 248 /* WhileStatement */:
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 252 /* ContinueStatement */:
|
||||
case 253 /* BreakStatement */:
|
||||
case 254 /* ReturnStatement */:
|
||||
@@ -27191,7 +27191,7 @@ function createNodeFactory(flags, baseFactory2) {
|
||||
return node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForInStatement(initializer, expression, statement), node) : node;
|
||||
}
|
||||
function createForOfStatement(awaitModifier, initializer, expression, statement) {
|
||||
const node = createBaseNode(251 /* ForOfStatement */);
|
||||
const node = createBaseNode(252 /* ForOfStatement */);
|
||||
node.awaitModifier = awaitModifier;
|
||||
node.initializer = initializer;
|
||||
node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
|
||||
@@ -30992,7 +30992,7 @@ function isForInStatement(node) {
|
||||
return node.kind === 250 /* ForInStatement */;
|
||||
}
|
||||
function isForOfStatement(node) {
|
||||
return node.kind === 251 /* ForOfStatement */;
|
||||
return node.kind === 252 /* ForOfStatement */;
|
||||
}
|
||||
function isContinueStatement(node) {
|
||||
return node.kind === 252 /* ContinueStatement */;
|
||||
@@ -32693,7 +32693,7 @@ var forEachChildTable = {
|
||||
[250 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) {
|
||||
return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement);
|
||||
},
|
||||
[251 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) {
|
||||
[252 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) {
|
||||
return visitNode2(cbNode, node.awaitModifier) || visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement);
|
||||
},
|
||||
[252 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement,
|
||||
@@ -34481,7 +34481,7 @@ var Parser;
|
||||
case 253 /* BreakStatement */:
|
||||
case 252 /* ContinueStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 249 /* ForStatement */:
|
||||
case 248 /* WhileStatement */:
|
||||
case 255 /* WithStatement */:
|
||||
@@ -47265,7 +47265,7 @@ function createBinder() {
|
||||
bindForStatement(node);
|
||||
break;
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
bindForInOrForOfStatement(node);
|
||||
break;
|
||||
case 246 /* IfStatement */:
|
||||
@@ -47655,7 +47655,7 @@ function createBinder() {
|
||||
bind(node.expression);
|
||||
addAntecedent(preLoopLabel, currentFlow);
|
||||
currentFlow = preLoopLabel;
|
||||
if (node.kind === 251 /* ForOfStatement */) {
|
||||
if (node.kind === 252 /* ForOfStatement */) {
|
||||
bind(node.awaitModifier);
|
||||
}
|
||||
addAntecedent(postLoopLabel, currentFlow);
|
||||
@@ -49648,7 +49648,7 @@ function getContainerFlags(node) {
|
||||
case 300 /* CatchClause */:
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 270 /* CaseBlock */:
|
||||
return 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */;
|
||||
case 242 /* Block */:
|
||||
@@ -52549,7 +52549,7 @@ function createTypeChecker(host) {
|
||||
switch (declaration2.parent.parent.kind) {
|
||||
case 244 /* VariableStatement */:
|
||||
case 249 /* ForStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
if (isSameScopeDescendentOf(usage2, declaration2, declContainer)) {
|
||||
return true;
|
||||
}
|
||||
@@ -60561,7 +60561,7 @@ function createTypeChecker(host) {
|
||||
)));
|
||||
return indexType.flags & (262144 /* TypeParameter */ | 4194304 /* Index */) ? getExtractStringType(indexType) : stringType;
|
||||
}
|
||||
if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 251 /* ForOfStatement */) {
|
||||
if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 252 /* ForOfStatement */) {
|
||||
const forOfStatement = declaration.parent.parent;
|
||||
return checkRightHandSideOfForOf(forOfStatement) || anyType;
|
||||
}
|
||||
@@ -74330,7 +74330,7 @@ function createTypeChecker(host) {
|
||||
return isDestructuringDefaultAssignment ? getTypeWithDefault(getAssignedType(node), node.right) : getTypeOfExpression(node.right);
|
||||
}
|
||||
function isDestructuringAssignmentTarget(parent2) {
|
||||
return parent2.parent.kind === 227 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 251 /* ForOfStatement */ && parent2.parent.initializer === parent2;
|
||||
return parent2.parent.kind === 227 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 252 /* ForOfStatement */ && parent2.parent.initializer === parent2;
|
||||
}
|
||||
function getAssignedTypeOfArrayLiteralElement(node, element) {
|
||||
return getTypeOfDestructuredArrayElement(getAssignedType(node), node.elements.indexOf(element));
|
||||
@@ -74349,7 +74349,7 @@ function createTypeChecker(host) {
|
||||
switch (parent2.kind) {
|
||||
case 250 /* ForInStatement */:
|
||||
return stringType;
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return checkRightHandSideOfForOf(parent2) || errorType;
|
||||
case 227 /* BinaryExpression */:
|
||||
return getAssignedTypeOfBinaryExpression(parent2);
|
||||
@@ -74383,7 +74383,7 @@ function createTypeChecker(host) {
|
||||
if (node.parent.parent.kind === 250 /* ForInStatement */) {
|
||||
return stringType;
|
||||
}
|
||||
if (node.parent.parent.kind === 251 /* ForOfStatement */) {
|
||||
if (node.parent.parent.kind === 252 /* ForOfStatement */) {
|
||||
return checkRightHandSideOfForOf(node.parent.parent) || errorType;
|
||||
}
|
||||
return errorType;
|
||||
@@ -74621,7 +74621,7 @@ function createTypeChecker(host) {
|
||||
if (isDeclarationWithExplicitTypeAnnotation(declaration)) {
|
||||
return getTypeOfSymbol(symbol);
|
||||
}
|
||||
if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 251 /* ForOfStatement */) {
|
||||
if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 252 /* ForOfStatement */) {
|
||||
const statement = declaration.parent.parent;
|
||||
const expressionType = getTypeOfDottedName(
|
||||
statement.expression,
|
||||
@@ -76060,7 +76060,7 @@ function createTypeChecker(host) {
|
||||
case 248 /* WhileStatement */:
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 255 /* WithStatement */:
|
||||
case 256 /* SwitchStatement */:
|
||||
case 259 /* TryStatement */:
|
||||
@@ -87377,7 +87377,7 @@ function createTypeChecker(host) {
|
||||
case 270 /* CaseBlock */:
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
checkUnusedLocalsAndParameters(node, addDiagnostic);
|
||||
break;
|
||||
case 177 /* Constructor */:
|
||||
@@ -91114,7 +91114,7 @@ function createTypeChecker(host) {
|
||||
return checkForStatement(node);
|
||||
case 250 /* ForInStatement */:
|
||||
return checkForInStatement(node);
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return checkForOfStatement(node);
|
||||
case 252 /* ContinueStatement */:
|
||||
case 253 /* BreakStatement */:
|
||||
@@ -92108,7 +92108,7 @@ function createTypeChecker(host) {
|
||||
}
|
||||
function getTypeOfAssignmentPattern(expr) {
|
||||
Debug.assert(expr.kind === 211 /* ObjectLiteralExpression */ || expr.kind === 210 /* ArrayLiteralExpression */);
|
||||
if (expr.parent.kind === 251 /* ForOfStatement */) {
|
||||
if (expr.parent.kind === 252 /* ForOfStatement */) {
|
||||
const iteratedType = checkRightHandSideOfForOf(expr.parent);
|
||||
return checkDestructuringAssignment(expr, iteratedType || errorType);
|
||||
}
|
||||
@@ -94100,7 +94100,7 @@ function createTypeChecker(host) {
|
||||
if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) {
|
||||
return true;
|
||||
}
|
||||
if (forInOrOfStatement.kind === 251 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) {
|
||||
if (forInOrOfStatement.kind === 252 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) {
|
||||
if (!(forInOrOfStatement.flags & 65536 /* AwaitContext */)) {
|
||||
const sourceFile = getSourceFileOfNode(forInOrOfStatement);
|
||||
if (isInTopLevelContext(forInOrOfStatement)) {
|
||||
@@ -94409,7 +94409,7 @@ function createTypeChecker(host) {
|
||||
return grammarErrorOnNode(node, Diagnostics._0_declarations_may_not_have_binding_patterns, "using");
|
||||
}
|
||||
}
|
||||
if (node.parent.parent.kind !== 250 /* ForInStatement */ && node.parent.parent.kind !== 251 /* ForOfStatement */) {
|
||||
if (node.parent.parent.kind !== 250 /* ForInStatement */ && node.parent.parent.kind !== 252 /* ForOfStatement */) {
|
||||
if (nodeFlags & 33554432 /* Ambient */) {
|
||||
checkAmbientInitializer(node);
|
||||
} else if (!node.initializer) {
|
||||
@@ -94501,7 +94501,7 @@ function createTypeChecker(host) {
|
||||
case 255 /* WithStatement */:
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return false;
|
||||
case 257 /* LabeledStatement */:
|
||||
return allowBlockDeclarations(parent2.parent);
|
||||
@@ -95961,7 +95961,7 @@ var visitEachChildTable = {
|
||||
visitIterationBody(node.statement, visitor, context, nodeVisitor)
|
||||
);
|
||||
},
|
||||
[251 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
||||
[252 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
||||
return context.factory.updateForOfStatement(
|
||||
node,
|
||||
tokenVisitor ? nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword) : node.awaitModifier,
|
||||
@@ -105132,7 +105132,7 @@ function transformES2017(context) {
|
||||
return visitForStatementInAsyncBody(node);
|
||||
case 250 /* ForInStatement */:
|
||||
return visitForInStatementInAsyncBody(node);
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return visitForOfStatementInAsyncBody(node);
|
||||
case 300 /* CatchClause */:
|
||||
return visitCatchClauseInAsyncBody(node);
|
||||
@@ -105986,7 +105986,7 @@ function transformES2018(context) {
|
||||
0 /* IterationStatementExcludes */,
|
||||
2 /* IterationStatementIncludes */
|
||||
);
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return visitForOfStatement(
|
||||
node,
|
||||
/*outermostLabeledStatement*/
|
||||
@@ -106157,7 +106157,7 @@ function transformES2018(context) {
|
||||
function visitLabeledStatement(node) {
|
||||
if (enclosingFunctionFlags & 2 /* Async */) {
|
||||
const statement = unwrapInnermostStatementOfLabel(node);
|
||||
if (statement.kind === 251 /* ForOfStatement */ && statement.awaitModifier) {
|
||||
if (statement.kind === 252 /* ForOfStatement */ && statement.awaitModifier) {
|
||||
return visitForOfStatement(statement, node);
|
||||
}
|
||||
return factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node);
|
||||
@@ -107498,7 +107498,7 @@ function transformESNext(context) {
|
||||
return visitBlock(node);
|
||||
case 249 /* ForStatement */:
|
||||
return visitForStatement(node);
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return visitForOfStatement(node);
|
||||
case 256 /* SwitchStatement */:
|
||||
return visitSwitchStatement(node);
|
||||
@@ -108736,7 +108736,7 @@ var entities = new Map(Object.entries({
|
||||
oslash: 248,
|
||||
ugrave: 249,
|
||||
uacute: 250,
|
||||
ucirc: 251,
|
||||
ucirc: 252,
|
||||
uuml: 252,
|
||||
yacute: 253,
|
||||
thorn: 254,
|
||||
@@ -109162,7 +109162,7 @@ function transformES2015(context) {
|
||||
/*outermostLabeledStatement*/
|
||||
void 0
|
||||
);
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return visitForOfStatement(
|
||||
node,
|
||||
/*outermostLabeledStatement*/
|
||||
@@ -110772,7 +110772,7 @@ function transformES2015(context) {
|
||||
return visitForStatement(node, outermostLabeledStatement);
|
||||
case 250 /* ForInStatement */:
|
||||
return visitForInStatement(node, outermostLabeledStatement);
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return visitForOfStatement(node, outermostLabeledStatement);
|
||||
}
|
||||
}
|
||||
@@ -111246,7 +111246,7 @@ function transformES2015(context) {
|
||||
return convertForStatement(node, initializerFunction, convertedLoopBody);
|
||||
case 250 /* ForInStatement */:
|
||||
return convertForInStatement(node, convertedLoopBody);
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return convertForOfStatement(node, convertedLoopBody);
|
||||
case 247 /* DoStatement */:
|
||||
return convertDoStatement(node, convertedLoopBody);
|
||||
@@ -111304,7 +111304,7 @@ function transformES2015(context) {
|
||||
switch (node.kind) {
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
const initializer = node.initializer;
|
||||
if (initializer && initializer.kind === 262 /* VariableDeclarationList */) {
|
||||
loopInitializer = initializer;
|
||||
@@ -114841,7 +114841,7 @@ function transformModule(context) {
|
||||
);
|
||||
case 250 /* ForInStatement */:
|
||||
return visitForInStatement(node);
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return visitForOfStatement(node);
|
||||
case 247 /* DoStatement */:
|
||||
return visitDoStatement(node);
|
||||
@@ -117113,7 +117113,7 @@ function transformSystemModule(context) {
|
||||
);
|
||||
case 250 /* ForInStatement */:
|
||||
return visitForInStatement(node);
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return visitForOfStatement(node);
|
||||
case 247 /* DoStatement */:
|
||||
return visitDoStatement(node);
|
||||
@@ -121646,7 +121646,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
||||
return emitForStatement(node);
|
||||
case 250 /* ForInStatement */:
|
||||
return emitForInStatement(node);
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return emitForOfStatement(node);
|
||||
case 252 /* ContinueStatement */:
|
||||
return emitContinueStatement(node);
|
||||
@@ -124787,7 +124787,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
||||
generateNames(node.elseStatement);
|
||||
break;
|
||||
case 249 /* ForStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
generateNames(node.initializer);
|
||||
generateNames(node.statement);
|
||||
@@ -139884,7 +139884,7 @@ function isCompletedNode(n, sourceFile) {
|
||||
return false;
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 248 /* WhileStatement */:
|
||||
return isCompletedNode(n.statement, sourceFile);
|
||||
case 247 /* DoStatement */:
|
||||
@@ -140674,7 +140674,7 @@ function isArrayLiteralOrObjectLiteralDestructuringPattern(node) {
|
||||
if (node.parent.kind === 227 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */) {
|
||||
return true;
|
||||
}
|
||||
if (node.parent.kind === 251 /* ForOfStatement */ && node.parent.initializer === node) {
|
||||
if (node.parent.kind === 252 /* ForOfStatement */ && node.parent.initializer === node) {
|
||||
return true;
|
||||
}
|
||||
if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 304 /* PropertyAssignment */ ? node.parent.parent : node.parent)) {
|
||||
@@ -143632,7 +143632,7 @@ var DocumentHighlights;
|
||||
// falls through
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 248 /* WhileStatement */:
|
||||
case 247 /* DoStatement */:
|
||||
return !statement.label || isLabeledBy(node, statement.label.escapedText);
|
||||
@@ -143712,7 +143712,7 @@ var DocumentHighlights;
|
||||
switch (owner.kind) {
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 247 /* DoStatement */:
|
||||
case 248 /* WhileStatement */:
|
||||
return getLoopBreakContinueOccurrences(owner);
|
||||
@@ -154280,7 +154280,7 @@ function spanInSourceFileAtLocation(sourceFile, position) {
|
||||
return spanInForStatement(node);
|
||||
case 250 /* ForInStatement */:
|
||||
return textSpanEndingAtNextToken(node, node.expression);
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return spanInInitializerOfForLike(node);
|
||||
case 256 /* SwitchStatement */:
|
||||
return textSpanEndingAtNextToken(node, node.expression);
|
||||
@@ -154378,7 +154378,7 @@ function spanInSourceFileAtLocation(sourceFile, position) {
|
||||
case 171 /* Decorator */:
|
||||
return spanInNode(node.parent);
|
||||
case 249 /* ForStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return textSpan(node);
|
||||
case 227 /* BinaryExpression */:
|
||||
if (node.parent.operatorToken.kind === 28 /* CommaToken */) {
|
||||
@@ -154441,7 +154441,7 @@ function spanInSourceFileAtLocation(sourceFile, position) {
|
||||
if (isBindingPattern(variableDeclaration.name)) {
|
||||
return spanInBindingPattern(variableDeclaration.name);
|
||||
}
|
||||
if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 32 /* Export */) || parent2.parent.kind === 251 /* ForOfStatement */) {
|
||||
if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 32 /* Export */) || parent2.parent.kind === 252 /* ForOfStatement */) {
|
||||
return textSpanFromVariableDeclaration(variableDeclaration);
|
||||
}
|
||||
if (isVariableDeclarationList(variableDeclaration.parent) && variableDeclaration.parent.declarations[0] !== variableDeclaration) {
|
||||
@@ -154500,7 +154500,7 @@ function spanInSourceFileAtLocation(sourceFile, position) {
|
||||
return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]);
|
||||
// Set span on previous token if it starts on same line otherwise on the first statement of the block
|
||||
case 249 /* ForStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return spanInNodeIfStartsOnSameLine(findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]);
|
||||
}
|
||||
return spanInNode(block.statements[0]);
|
||||
@@ -154630,7 +154630,7 @@ function spanInSourceFileAtLocation(sourceFile, position) {
|
||||
case 248 /* WhileStatement */:
|
||||
case 247 /* DoStatement */:
|
||||
case 249 /* ForStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 214 /* CallExpression */:
|
||||
case 215 /* NewExpression */:
|
||||
case 218 /* ParenthesizedExpression */:
|
||||
@@ -154659,7 +154659,7 @@ function spanInSourceFileAtLocation(sourceFile, position) {
|
||||
return spanInNode(node2.parent);
|
||||
}
|
||||
function spanInOfKeyword(node2) {
|
||||
if (node2.parent.kind === 251 /* ForOfStatement */) {
|
||||
if (node2.parent.kind === 252 /* ForOfStatement */) {
|
||||
return spanInNextNode(node2);
|
||||
}
|
||||
return spanInNode(node2.parent);
|
||||
@@ -162485,7 +162485,7 @@ function canPrefix(token) {
|
||||
case 261 /* VariableDeclaration */: {
|
||||
const varDecl = token.parent;
|
||||
switch (varDecl.parent.parent.kind) {
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
return true;
|
||||
}
|
||||
@@ -169764,7 +169764,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
|
||||
isNewIdentifierLocation = false;
|
||||
const rootDeclaration = getRootDeclaration(objectLikeContainer.parent);
|
||||
if (!isVariableLike(rootDeclaration)) return Debug.fail("Root declaration is not variable-like.");
|
||||
let canGetType = hasInitializer(rootDeclaration) || !!getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === 251 /* ForOfStatement */;
|
||||
let canGetType = hasInitializer(rootDeclaration) || !!getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === 252 /* ForOfStatement */;
|
||||
if (!canGetType && rootDeclaration.kind === 170 /* Parameter */) {
|
||||
if (isExpression(rootDeclaration.parent)) {
|
||||
canGetType = !!typeChecker.getContextualType(rootDeclaration.parent);
|
||||
@@ -172505,7 +172505,7 @@ function getContextNode(node) {
|
||||
return node.parent;
|
||||
case 227 /* BinaryExpression */:
|
||||
return isExpressionStatement(node.parent) ? node.parent : node;
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
return {
|
||||
start: node.initializer,
|
||||
@@ -177133,7 +177133,7 @@ function getOutliningSpanForNode(n, sourceFile) {
|
||||
switch (n.parent.kind) {
|
||||
case 247 /* DoStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 249 /* ForStatement */:
|
||||
case 246 /* IfStatement */:
|
||||
case 248 /* WhileStatement */:
|
||||
@@ -180339,7 +180339,7 @@ var deleteDeclaration;
|
||||
}
|
||||
const gp = parent2.parent;
|
||||
switch (gp.kind) {
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
changes.replaceNode(sourceFile, node, factory.createObjectLiteralExpression());
|
||||
break;
|
||||
@@ -181131,7 +181131,7 @@ function isBinaryOpContext(context) {
|
||||
case 169 /* TypeParameter */:
|
||||
return context.currentTokenSpan.kind === 103 /* InKeyword */ || context.nextTokenSpan.kind === 103 /* InKeyword */ || context.currentTokenSpan.kind === 64 /* EqualsToken */ || context.nextTokenSpan.kind === 64 /* EqualsToken */;
|
||||
// Technically, "of" is not a binary operator, but format it the same way as "in"
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
return context.currentTokenSpan.kind === 165 /* OfKeyword */ || context.nextTokenSpan.kind === 165 /* OfKeyword */;
|
||||
}
|
||||
return false;
|
||||
@@ -181262,7 +181262,7 @@ function isControlDeclContext(context) {
|
||||
case 256 /* SwitchStatement */:
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 248 /* WhileStatement */:
|
||||
case 259 /* TryStatement */:
|
||||
case 247 /* DoStatement */:
|
||||
@@ -181409,7 +181409,7 @@ function isStatementConditionContext(context) {
|
||||
case 246 /* IfStatement */:
|
||||
case 249 /* ForStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 247 /* DoStatement */:
|
||||
case 248 /* WhileStatement */:
|
||||
return true;
|
||||
@@ -183041,7 +183041,7 @@ var SmartIndenter;
|
||||
case 247 /* DoStatement */:
|
||||
case 248 /* WhileStatement */:
|
||||
case 250 /* ForInStatement */:
|
||||
case 251 /* ForOfStatement */:
|
||||
case 252 /* ForOfStatement */:
|
||||
case 249 /* ForStatement */:
|
||||
case 246 /* IfStatement */:
|
||||
case 263 /* FunctionDeclaration */:
|
||||
|
||||
4
valdi/node_modules/typescript/package.json
generated
vendored
4
valdi/node_modules/typescript/package.json
generated
vendored
@@ -43,7 +43,7 @@
|
||||
"@dprint/typescript": "0.93.4",
|
||||
"@esfx/canceltoken": "^1.0.0",
|
||||
"@eslint/js": "^9.20.0",
|
||||
"@octokit/rest": "^21.1.1",
|
||||
"@octokit/rest": "^21.1.2",
|
||||
"@types/chai": "^4.3.20",
|
||||
"@types/diff": "^7.0.1",
|
||||
"@types/minimist": "^1.2.5",
|
||||
@@ -76,7 +76,7 @@
|
||||
"mocha-fivemat-progress-reporter": "^0.1.0",
|
||||
"monocart-coverage-reports": "^2.12.1",
|
||||
"ms": "^2.1.3",
|
||||
"picocolors": "^1.1.1",
|
||||
"picocolors": "^1.1.2",
|
||||
"playwright": "^1.50.1",
|
||||
"source-map-support": "^0.5.21",
|
||||
"tslib": "^2.8.1",
|
||||
|
||||
Reference in New Issue
Block a user