mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Merge pull request #2066 from Microsoft/forOf
Parsing for for...of statements
This commit is contained in:
commit
d2c992c2de
@ -489,6 +489,7 @@ module ts {
|
||||
case SyntaxKind.CatchClause:
|
||||
case SyntaxKind.ForStatement:
|
||||
case SyntaxKind.ForInStatement:
|
||||
case SyntaxKind.ForOfStatement:
|
||||
case SyntaxKind.SwitchStatement:
|
||||
bindChildren(node, 0, /*isBlockScopeContainer*/ true);
|
||||
break;
|
||||
|
||||
@ -4642,6 +4642,7 @@ module ts {
|
||||
case SyntaxKind.WhileStatement:
|
||||
case SyntaxKind.ForStatement:
|
||||
case SyntaxKind.ForInStatement:
|
||||
case SyntaxKind.ForOfStatement:
|
||||
case SyntaxKind.ReturnStatement:
|
||||
case SyntaxKind.WithStatement:
|
||||
case SyntaxKind.SwitchStatement:
|
||||
@ -8237,7 +8238,7 @@ module ts {
|
||||
function checkBlock(node: Block) {
|
||||
// Grammar checking for SyntaxKind.Block
|
||||
if (node.kind === SyntaxKind.Block) {
|
||||
checkGrammarForStatementInAmbientContext(node);
|
||||
checkGrammarStatementInAmbientContext(node);
|
||||
}
|
||||
|
||||
forEach(node.statements, checkSourceElement);
|
||||
@ -8553,14 +8554,14 @@ module ts {
|
||||
|
||||
function checkExpressionStatement(node: ExpressionStatement) {
|
||||
// Grammar checking
|
||||
checkGrammarForStatementInAmbientContext(node)
|
||||
checkGrammarStatementInAmbientContext(node)
|
||||
|
||||
checkExpression(node.expression);
|
||||
}
|
||||
|
||||
function checkIfStatement(node: IfStatement) {
|
||||
// Grammar checking
|
||||
checkGrammarForStatementInAmbientContext(node);
|
||||
checkGrammarStatementInAmbientContext(node);
|
||||
|
||||
checkExpression(node.expression);
|
||||
checkSourceElement(node.thenStatement);
|
||||
@ -8569,7 +8570,7 @@ module ts {
|
||||
|
||||
function checkDoStatement(node: DoStatement) {
|
||||
// Grammar checking
|
||||
checkGrammarForStatementInAmbientContext(node);
|
||||
checkGrammarStatementInAmbientContext(node);
|
||||
|
||||
checkSourceElement(node.statement);
|
||||
checkExpression(node.expression);
|
||||
@ -8577,7 +8578,7 @@ module ts {
|
||||
|
||||
function checkWhileStatement(node: WhileStatement) {
|
||||
// Grammar checking
|
||||
checkGrammarForStatementInAmbientContext(node);
|
||||
checkGrammarStatementInAmbientContext(node);
|
||||
|
||||
checkExpression(node.expression);
|
||||
checkSourceElement(node.statement);
|
||||
@ -8585,7 +8586,7 @@ module ts {
|
||||
|
||||
function checkForStatement(node: ForStatement) {
|
||||
// Grammar checking
|
||||
if (!checkGrammarForStatementInAmbientContext(node)) {
|
||||
if (!checkGrammarStatementInAmbientContext(node)) {
|
||||
if (node.initializer && node.initializer.kind == SyntaxKind.VariableDeclarationList) {
|
||||
checkGrammarVariableDeclarationList(<VariableDeclarationList>node.initializer);
|
||||
}
|
||||
@ -8605,18 +8606,14 @@ module ts {
|
||||
checkSourceElement(node.statement);
|
||||
}
|
||||
|
||||
function checkForOfStatement(node: ForOfStatement) {
|
||||
// TODO: not yet implemented
|
||||
checkGrammarForOfStatement(node);
|
||||
}
|
||||
|
||||
function checkForInStatement(node: ForInStatement) {
|
||||
// Grammar checking
|
||||
if (!checkGrammarForStatementInAmbientContext(node)) {
|
||||
if (node.initializer.kind === SyntaxKind.VariableDeclarationList) {
|
||||
var variableList = <VariableDeclarationList>node.initializer;
|
||||
if (!checkGrammarVariableDeclarationList(variableList)) {
|
||||
if (variableList.declarations.length > 1) {
|
||||
grammarErrorOnFirstToken(variableList.declarations[1], Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
checkGrammarForInOrForOfStatement(node);
|
||||
|
||||
// TypeScript 1.0 spec (April 2014): 5.4
|
||||
// In a 'for-in' statement of the form
|
||||
@ -8628,9 +8625,6 @@ module ts {
|
||||
if (variableDeclarationList.declarations.length >= 1) {
|
||||
var decl = variableDeclarationList.declarations[0];
|
||||
checkVariableDeclaration(decl);
|
||||
if (decl.type) {
|
||||
error(decl, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -8661,7 +8655,7 @@ module ts {
|
||||
|
||||
function checkBreakOrContinueStatement(node: BreakOrContinueStatement) {
|
||||
// Grammar checking
|
||||
checkGrammarForStatementInAmbientContext(node) || checkGrammarBreakOrContinueStatement(node);
|
||||
checkGrammarStatementInAmbientContext(node) || checkGrammarBreakOrContinueStatement(node);
|
||||
|
||||
// TODO: Check that target label is valid
|
||||
}
|
||||
@ -8672,7 +8666,7 @@ module ts {
|
||||
|
||||
function checkReturnStatement(node: ReturnStatement) {
|
||||
// Grammar checking
|
||||
if (!checkGrammarForStatementInAmbientContext(node)) {
|
||||
if (!checkGrammarStatementInAmbientContext(node)) {
|
||||
var functionBlock = getContainingFunction(node);
|
||||
if (!functionBlock) {
|
||||
grammarErrorOnFirstToken(node, Diagnostics.A_return_statement_can_only_be_used_within_a_function_body);
|
||||
@ -8703,7 +8697,7 @@ module ts {
|
||||
|
||||
function checkWithStatement(node: WithStatement) {
|
||||
// Grammar checking for withStatement
|
||||
if (!checkGrammarForStatementInAmbientContext(node)) {
|
||||
if (!checkGrammarStatementInAmbientContext(node)) {
|
||||
if (node.parserContextFlags & ParserContextFlags.StrictMode) {
|
||||
grammarErrorOnFirstToken(node, Diagnostics.with_statements_are_not_allowed_in_strict_mode);
|
||||
}
|
||||
@ -8715,7 +8709,7 @@ module ts {
|
||||
|
||||
function checkSwitchStatement(node: SwitchStatement) {
|
||||
// Grammar checking
|
||||
checkGrammarForStatementInAmbientContext(node);
|
||||
checkGrammarStatementInAmbientContext(node);
|
||||
|
||||
var firstDefaultClause: CaseOrDefaultClause;
|
||||
var hasDuplicateDefaultClause = false;
|
||||
@ -8752,7 +8746,7 @@ module ts {
|
||||
|
||||
function checkLabeledStatement(node: LabeledStatement) {
|
||||
// Grammar checking
|
||||
if (!checkGrammarForStatementInAmbientContext(node)) {
|
||||
if (!checkGrammarStatementInAmbientContext(node)) {
|
||||
var current = node.parent;
|
||||
while (current) {
|
||||
if (isAnyFunction(current)) {
|
||||
@ -8773,7 +8767,7 @@ module ts {
|
||||
|
||||
function checkThrowStatement(node: ThrowStatement) {
|
||||
// Grammar checking
|
||||
if (!checkGrammarForStatementInAmbientContext(node)) {
|
||||
if (!checkGrammarStatementInAmbientContext(node)) {
|
||||
if (node.expression === undefined) {
|
||||
grammarErrorAfterFirstToken(node, Diagnostics.Line_break_not_permitted_here);
|
||||
}
|
||||
@ -8786,7 +8780,7 @@ module ts {
|
||||
|
||||
function checkTryStatement(node: TryStatement) {
|
||||
// Grammar checking
|
||||
checkGrammarForStatementInAmbientContext(node);
|
||||
checkGrammarStatementInAmbientContext(node);
|
||||
|
||||
checkBlock(node.tryBlock);
|
||||
var catchClause = node.catchClause;
|
||||
@ -9609,6 +9603,8 @@ module ts {
|
||||
return checkForStatement(<ForStatement>node);
|
||||
case SyntaxKind.ForInStatement:
|
||||
return checkForInStatement(<ForInStatement>node);
|
||||
case SyntaxKind.ForOfStatement:
|
||||
return checkForOfStatement(<ForOfStatement>node);
|
||||
case SyntaxKind.ContinueStatement:
|
||||
case SyntaxKind.BreakStatement:
|
||||
return checkBreakOrContinueStatement(<BreakOrContinueStatement>node);
|
||||
@ -9643,10 +9639,10 @@ module ts {
|
||||
case SyntaxKind.ExportAssignment:
|
||||
return checkExportAssignment(<ExportAssignment>node);
|
||||
case SyntaxKind.EmptyStatement:
|
||||
checkGrammarForStatementInAmbientContext(node);
|
||||
checkGrammarStatementInAmbientContext(node);
|
||||
return;
|
||||
case SyntaxKind.DebuggerStatement:
|
||||
checkGrammarForStatementInAmbientContext(node);
|
||||
checkGrammarStatementInAmbientContext(node);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -9718,6 +9714,7 @@ module ts {
|
||||
case SyntaxKind.WhileStatement:
|
||||
case SyntaxKind.ForStatement:
|
||||
case SyntaxKind.ForInStatement:
|
||||
case SyntaxKind.ForOfStatement:
|
||||
case SyntaxKind.ContinueStatement:
|
||||
case SyntaxKind.BreakStatement:
|
||||
case SyntaxKind.ReturnStatement:
|
||||
@ -10928,6 +10925,49 @@ module ts {
|
||||
}
|
||||
}
|
||||
|
||||
function checkGrammarForInOrForOfStatement(forInOrOfStatement: ForInStatement | ForOfStatement): boolean {
|
||||
if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (forInOrOfStatement.initializer.kind === SyntaxKind.VariableDeclarationList) {
|
||||
var variableList = <VariableDeclarationList>forInOrOfStatement.initializer;
|
||||
if (!checkGrammarVariableDeclarationList(variableList)) {
|
||||
if (variableList.declarations.length > 1) {
|
||||
var diagnostic = forInOrOfStatement.kind === SyntaxKind.ForInStatement
|
||||
? Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement
|
||||
: Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement;
|
||||
return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic);
|
||||
}
|
||||
var firstDeclaration = variableList.declarations[0];
|
||||
if (firstDeclaration.initializer) {
|
||||
var diagnostic = forInOrOfStatement.kind === SyntaxKind.ForInStatement
|
||||
? Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer
|
||||
: Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer;
|
||||
return grammarErrorOnNode(firstDeclaration.name, diagnostic);
|
||||
}
|
||||
if (firstDeclaration.type) {
|
||||
var diagnostic = forInOrOfStatement.kind === SyntaxKind.ForInStatement
|
||||
? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation
|
||||
: Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation;
|
||||
return grammarErrorOnNode(firstDeclaration, diagnostic);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function checkGrammarForOfStatement(forOfStatement: ForOfStatement): boolean {
|
||||
// Temporarily disallow for-of statements until type check work is complete.
|
||||
return grammarErrorOnFirstToken(forOfStatement, Diagnostics.for_of_statements_are_not_currently_supported);
|
||||
if (languageVersion < ScriptTarget.ES6) {
|
||||
return grammarErrorOnFirstToken(forOfStatement, Diagnostics.for_of_statements_are_only_available_when_targeting_ECMAScript_6_or_higher);
|
||||
}
|
||||
|
||||
return checkGrammarForInOrForOfStatement(forOfStatement);
|
||||
}
|
||||
|
||||
function checkGrammarAccessor(accessor: MethodDeclaration): boolean {
|
||||
var kind = accessor.kind;
|
||||
if (languageVersion < ScriptTarget.ES5) {
|
||||
@ -11020,6 +11060,7 @@ module ts {
|
||||
switch (node.kind) {
|
||||
case SyntaxKind.ForStatement:
|
||||
case SyntaxKind.ForInStatement:
|
||||
case SyntaxKind.ForOfStatement:
|
||||
case SyntaxKind.DoStatement:
|
||||
case SyntaxKind.WhileStatement:
|
||||
return true;
|
||||
@ -11176,6 +11217,7 @@ module ts {
|
||||
case SyntaxKind.WithStatement:
|
||||
case SyntaxKind.ForStatement:
|
||||
case SyntaxKind.ForInStatement:
|
||||
case SyntaxKind.ForOfStatement:
|
||||
return false;
|
||||
case SyntaxKind.LabeledStatement:
|
||||
return allowLetAndConstDeclarations(parent.parent);
|
||||
@ -11366,7 +11408,7 @@ module ts {
|
||||
return isInAmbientContext(node) && checkGrammarTopLevelElementsForRequiredDeclareModifier(node);
|
||||
}
|
||||
|
||||
function checkGrammarForStatementInAmbientContext(node: Node): boolean {
|
||||
function checkGrammarStatementInAmbientContext(node: Node): boolean {
|
||||
if (isInAmbientContext(node)) {
|
||||
// An accessors is already reported about the ambient context
|
||||
if (isAccessor(node.parent.kind)) {
|
||||
|
||||
@ -147,6 +147,9 @@ module ts {
|
||||
Merge_conflict_marker_encountered: { code: 1185, category: DiagnosticCategory.Error, key: "Merge conflict marker encountered." },
|
||||
A_rest_element_cannot_have_an_initializer: { code: 1186, category: DiagnosticCategory.Error, key: "A rest element cannot have an initializer." },
|
||||
A_parameter_property_may_not_be_a_binding_pattern: { code: 1187, category: DiagnosticCategory.Error, key: "A parameter property may not be a binding pattern." },
|
||||
Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement: { code: 1188, category: DiagnosticCategory.Error, key: "Only a single variable declaration is allowed in a 'for...of' statement." },
|
||||
The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer: { code: 1189, category: DiagnosticCategory.Error, key: "The variable declaration of a 'for...in' statement cannot have an initializer." },
|
||||
The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer: { code: 1190, category: DiagnosticCategory.Error, key: "The variable declaration of a 'for...of' statement cannot have an initializer." },
|
||||
Duplicate_identifier_0: { code: 2300, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'." },
|
||||
Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: DiagnosticCategory.Error, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." },
|
||||
Static_members_cannot_reference_class_type_parameters: { code: 2302, category: DiagnosticCategory.Error, key: "Static members cannot reference class type parameters." },
|
||||
@ -317,6 +320,8 @@ module ts {
|
||||
Property_0_does_not_exist_on_const_enum_1: { code: 2479, category: DiagnosticCategory.Error, key: "Property '{0}' does not exist on 'const' enum '{1}'." },
|
||||
let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: { code: 2480, category: DiagnosticCategory.Error, key: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." },
|
||||
Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: { code: 2481, category: DiagnosticCategory.Error, key: "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'." },
|
||||
for_of_statements_are_only_available_when_targeting_ECMAScript_6_or_higher: { code: 2482, category: DiagnosticCategory.Error, key: "'for...of' statements are only available when targeting ECMAScript 6 or higher." },
|
||||
The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: { code: 2483, category: DiagnosticCategory.Error, key: "The left-hand side of a 'for...of' statement cannot use a type annotation." },
|
||||
Import_declaration_0_is_using_private_name_1: { code: 4000, category: DiagnosticCategory.Error, key: "Import declaration '{0}' is using private name '{1}'." },
|
||||
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
|
||||
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },
|
||||
@ -462,5 +467,6 @@ module ts {
|
||||
yield_expressions_are_not_currently_supported: { code: 9000, category: DiagnosticCategory.Error, key: "'yield' expressions are not currently supported." },
|
||||
Generators_are_not_currently_supported: { code: 9001, category: DiagnosticCategory.Error, key: "Generators are not currently supported." },
|
||||
The_arguments_object_cannot_be_referenced_in_an_arrow_function_Consider_using_a_standard_function_expression: { code: 9002, category: DiagnosticCategory.Error, key: "The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression." },
|
||||
for_of_statements_are_not_currently_supported: { code: 9003, category: DiagnosticCategory.Error, key: "'for...of' statements are not currently supported." },
|
||||
};
|
||||
}
|
||||
@ -579,6 +579,18 @@
|
||||
"category": "Error",
|
||||
"code": 1187
|
||||
},
|
||||
"Only a single variable declaration is allowed in a 'for...of' statement.": {
|
||||
"category": "Error",
|
||||
"code": 1188
|
||||
},
|
||||
"The variable declaration of a 'for...in' statement cannot have an initializer.": {
|
||||
"category": "Error",
|
||||
"code": 1189
|
||||
},
|
||||
"The variable declaration of a 'for...of' statement cannot have an initializer.": {
|
||||
"category": "Error",
|
||||
"code": 1190
|
||||
},
|
||||
|
||||
"Duplicate identifier '{0}'.": {
|
||||
"category": "Error",
|
||||
@ -1260,6 +1272,14 @@
|
||||
"category": "Error",
|
||||
"code": 2481
|
||||
},
|
||||
"'for...of' statements are only available when targeting ECMAScript 6 or higher.": {
|
||||
"category": "Error",
|
||||
"code": 2482
|
||||
},
|
||||
"The left-hand side of a 'for...of' statement cannot use a type annotation.": {
|
||||
"category": "Error",
|
||||
"code": 2483
|
||||
},
|
||||
|
||||
"Import declaration '{0}' is using private name '{1}'.": {
|
||||
"category": "Error",
|
||||
@ -1536,7 +1556,7 @@
|
||||
"Exported type alias '{0}' has or is using private name '{1}'.": {
|
||||
"category": "Error",
|
||||
"code": 4081
|
||||
},
|
||||
},
|
||||
"The current host does not support the '{0}' option.": {
|
||||
"category": "Error",
|
||||
"code": 5001
|
||||
@ -1841,5 +1861,9 @@
|
||||
"The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.": {
|
||||
"category": "Error",
|
||||
"code": 9002
|
||||
},
|
||||
"'for...of' statements are not currently supported.": {
|
||||
"category": "Error",
|
||||
"code": 9003
|
||||
}
|
||||
}
|
||||
|
||||
@ -2915,7 +2915,7 @@ module ts {
|
||||
emitEmbeddedStatement(node.statement);
|
||||
}
|
||||
|
||||
function emitForInStatement(node: ForInStatement) {
|
||||
function emitForInOrForOfStatement(node: ForInStatement | ForOfStatement) {
|
||||
var endPos = emitToken(SyntaxKind.ForKeyword, node.pos);
|
||||
write(" ");
|
||||
endPos = emitToken(SyntaxKind.OpenParenToken, endPos);
|
||||
@ -2936,7 +2936,13 @@ module ts {
|
||||
else {
|
||||
emit(node.initializer);
|
||||
}
|
||||
write(" in ");
|
||||
|
||||
if (node.kind === SyntaxKind.ForInStatement) {
|
||||
write(" in ");
|
||||
}
|
||||
else {
|
||||
write(" of ");
|
||||
}
|
||||
emit(node.expression);
|
||||
emitToken(SyntaxKind.CloseParenToken, node.expression.end);
|
||||
emitEmbeddedStatement(node.statement);
|
||||
@ -4355,8 +4361,9 @@ module ts {
|
||||
return emitWhileStatement(<WhileStatement>node);
|
||||
case SyntaxKind.ForStatement:
|
||||
return emitForStatement(<ForStatement>node);
|
||||
case SyntaxKind.ForOfStatement:
|
||||
case SyntaxKind.ForInStatement:
|
||||
return emitForInStatement(<ForInStatement>node);
|
||||
return emitForInOrForOfStatement(<ForInStatement>node);
|
||||
case SyntaxKind.ContinueStatement:
|
||||
case SyntaxKind.BreakStatement:
|
||||
return emitBreakOrContinueStatement(<BreakOrContinueStatement>node);
|
||||
|
||||
@ -191,6 +191,10 @@ module ts {
|
||||
return visitNode(cbNode, (<ForInStatement>node).initializer) ||
|
||||
visitNode(cbNode, (<ForInStatement>node).expression) ||
|
||||
visitNode(cbNode, (<ForInStatement>node).statement);
|
||||
case SyntaxKind.ForOfStatement:
|
||||
return visitNode(cbNode, (<ForOfStatement>node).initializer) ||
|
||||
visitNode(cbNode, (<ForOfStatement>node).expression) ||
|
||||
visitNode(cbNode, (<ForOfStatement>node).statement);
|
||||
case SyntaxKind.ContinueStatement:
|
||||
case SyntaxKind.BreakStatement:
|
||||
return visitNode(cbNode, (<BreakOrContinueStatement>node).label);
|
||||
@ -1598,8 +1602,8 @@ module ts {
|
||||
}
|
||||
|
||||
// in the case where we're parsing the variable declarator of a 'for-in' statement, we
|
||||
// are done if we see an 'in' keyword in front of us.
|
||||
if (token === SyntaxKind.InKeyword) {
|
||||
// are done if we see an 'in' keyword in front of us. Same with for-of
|
||||
if (isInOrOfKeyword(token)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1877,6 +1881,7 @@ module ts {
|
||||
case SyntaxKind.BreakStatement:
|
||||
case SyntaxKind.ContinueStatement:
|
||||
case SyntaxKind.ForInStatement:
|
||||
case SyntaxKind.ForOfStatement:
|
||||
case SyntaxKind.ForStatement:
|
||||
case SyntaxKind.WhileStatement:
|
||||
case SyntaxKind.WithStatement:
|
||||
@ -3161,6 +3166,10 @@ module ts {
|
||||
return parseBinaryExpressionRest(precedence, leftOperand);
|
||||
}
|
||||
|
||||
function isInOrOfKeyword(t: SyntaxKind) {
|
||||
return t === SyntaxKind.InKeyword || t === SyntaxKind.OfKeyword;
|
||||
}
|
||||
|
||||
function parseBinaryExpressionRest(precedence: number, leftOperand: Expression): Expression {
|
||||
while (true) {
|
||||
// We either have a binary operator here, or we're finished. We call
|
||||
@ -3790,7 +3799,7 @@ module ts {
|
||||
return finishNode(node);
|
||||
}
|
||||
|
||||
function parseForOrForInStatement(): Statement {
|
||||
function parseForOrForInOrForOfStatement(): Statement {
|
||||
var pos = getNodePos();
|
||||
parseExpected(SyntaxKind.ForKeyword);
|
||||
parseExpected(SyntaxKind.OpenParenToken);
|
||||
@ -3798,21 +3807,27 @@ module ts {
|
||||
var initializer: VariableDeclarationList | Expression = undefined;
|
||||
if (token !== SyntaxKind.SemicolonToken) {
|
||||
if (token === SyntaxKind.VarKeyword || token === SyntaxKind.LetKeyword || token === SyntaxKind.ConstKeyword) {
|
||||
initializer = parseVariableDeclarationList(/*disallowIn:*/ true);
|
||||
initializer = parseVariableDeclarationList(/*inForStatementInitializer:*/ true);
|
||||
}
|
||||
else {
|
||||
initializer = disallowInAnd(parseExpression);
|
||||
}
|
||||
}
|
||||
var forOrForInStatement: IterationStatement;
|
||||
var forOrForInOrForOfStatement: IterationStatement;
|
||||
if (parseOptional(SyntaxKind.InKeyword)) {
|
||||
var forInStatement = <ForInStatement>createNode(SyntaxKind.ForInStatement, pos);
|
||||
forInStatement.initializer = initializer;
|
||||
forInStatement.expression = allowInAnd(parseExpression);
|
||||
parseExpected(SyntaxKind.CloseParenToken);
|
||||
forOrForInStatement = forInStatement;
|
||||
forOrForInOrForOfStatement = forInStatement;
|
||||
}
|
||||
else {
|
||||
else if (parseOptional(SyntaxKind.OfKeyword)) {
|
||||
var forOfStatement = <ForOfStatement>createNode(SyntaxKind.ForOfStatement, pos);
|
||||
forOfStatement.initializer = initializer;
|
||||
forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher);
|
||||
parseExpected(SyntaxKind.CloseParenToken);
|
||||
forOrForInOrForOfStatement = forOfStatement;
|
||||
} else {
|
||||
var forStatement = <ForStatement>createNode(SyntaxKind.ForStatement, pos);
|
||||
forStatement.initializer = initializer;
|
||||
parseExpected(SyntaxKind.SemicolonToken);
|
||||
@ -3824,12 +3839,12 @@ module ts {
|
||||
forStatement.iterator = allowInAnd(parseExpression);
|
||||
}
|
||||
parseExpected(SyntaxKind.CloseParenToken);
|
||||
forOrForInStatement = forStatement;
|
||||
forOrForInOrForOfStatement = forStatement;
|
||||
}
|
||||
|
||||
forOrForInStatement.statement = parseStatement();
|
||||
forOrForInOrForOfStatement.statement = parseStatement();
|
||||
|
||||
return finishNode(forOrForInStatement);
|
||||
return finishNode(forOrForInOrForOfStatement);
|
||||
}
|
||||
|
||||
function parseBreakOrContinueStatement(kind: SyntaxKind): BreakOrContinueStatement {
|
||||
@ -4075,7 +4090,7 @@ module ts {
|
||||
case SyntaxKind.WhileKeyword:
|
||||
return parseWhileStatement();
|
||||
case SyntaxKind.ForKeyword:
|
||||
return parseForOrForInStatement();
|
||||
return parseForOrForInOrForOfStatement();
|
||||
case SyntaxKind.ContinueKeyword:
|
||||
return parseBreakOrContinueStatement(SyntaxKind.ContinueStatement);
|
||||
case SyntaxKind.BreakKeyword:
|
||||
@ -4217,11 +4232,13 @@ module ts {
|
||||
var node = <VariableDeclaration>createNode(SyntaxKind.VariableDeclaration);
|
||||
node.name = parseIdentifierOrPattern();
|
||||
node.type = parseTypeAnnotation();
|
||||
node.initializer = parseInitializer(/*inParameter*/ false);
|
||||
if (!isInOrOfKeyword(token)) {
|
||||
node.initializer = parseInitializer(/*inParameter*/ false);
|
||||
}
|
||||
return finishNode(node);
|
||||
}
|
||||
|
||||
function parseVariableDeclarationList(disallowIn: boolean): VariableDeclarationList {
|
||||
function parseVariableDeclarationList(inForStatementInitializer: boolean): VariableDeclarationList {
|
||||
var node = <VariableDeclarationList>createNode(SyntaxKind.VariableDeclarationList);
|
||||
|
||||
switch (token) {
|
||||
@ -4238,20 +4255,39 @@ module ts {
|
||||
}
|
||||
|
||||
nextToken();
|
||||
var savedDisallowIn = inDisallowInContext();
|
||||
setDisallowInContext(disallowIn);
|
||||
|
||||
node.declarations = parseDelimitedList(ParsingContext.VariableDeclarations, parseVariableDeclaration);
|
||||
// The user may have written the following:
|
||||
//
|
||||
// for (var of X) { }
|
||||
//
|
||||
// In this case, we want to parse an empty declaration list, and then parse 'of'
|
||||
// as a keyword. The reason this is not automatic is that 'of' is a valid identifier.
|
||||
// So we need to look ahead to determine if 'of' should be treated as a keyword in
|
||||
// this context.
|
||||
// The checker will then give an error that there is an empty declaration list.
|
||||
if (token === SyntaxKind.OfKeyword && lookAhead(canFollowContextualOfKeyword)) {
|
||||
node.declarations = createMissingList<VariableDeclaration>();
|
||||
}
|
||||
else {
|
||||
var savedDisallowIn = inDisallowInContext();
|
||||
setDisallowInContext(inForStatementInitializer);
|
||||
|
||||
setDisallowInContext(savedDisallowIn);
|
||||
node.declarations = parseDelimitedList(ParsingContext.VariableDeclarations, parseVariableDeclaration);
|
||||
|
||||
setDisallowInContext(savedDisallowIn);
|
||||
}
|
||||
|
||||
return finishNode(node);
|
||||
}
|
||||
|
||||
function canFollowContextualOfKeyword(): boolean {
|
||||
return nextTokenIsIdentifier() && nextToken() === SyntaxKind.CloseParenToken;
|
||||
}
|
||||
|
||||
function parseVariableStatement(fullStart: number, modifiers: ModifiersArray): VariableStatement {
|
||||
var node = <VariableStatement>createNode(SyntaxKind.VariableStatement, fullStart);
|
||||
setModifiers(node, modifiers);
|
||||
node.declarationList = parseVariableDeclarationList(/*disallowIn:*/ false);
|
||||
node.declarationList = parseVariableDeclarationList(/*inForStatementInitializer:*/ false);
|
||||
parseSemicolon();
|
||||
return finishNode(node);
|
||||
}
|
||||
|
||||
@ -94,6 +94,7 @@ module ts {
|
||||
"while": SyntaxKind.WhileKeyword,
|
||||
"with": SyntaxKind.WithKeyword,
|
||||
"yield": SyntaxKind.YieldKeyword,
|
||||
"of": SyntaxKind.OfKeyword,
|
||||
"{": SyntaxKind.OpenBraceToken,
|
||||
"}": SyntaxKind.CloseBraceToken,
|
||||
"(": SyntaxKind.OpenParenToken,
|
||||
|
||||
@ -142,7 +142,7 @@ module ts {
|
||||
StringKeyword,
|
||||
SymbolKeyword,
|
||||
TypeKeyword,
|
||||
|
||||
OfKeyword,
|
||||
// Parse tree nodes
|
||||
|
||||
// Names
|
||||
@ -211,6 +211,7 @@ module ts {
|
||||
WhileStatement,
|
||||
ForStatement,
|
||||
ForInStatement,
|
||||
ForOfStatement,
|
||||
ContinueStatement,
|
||||
BreakStatement,
|
||||
ReturnStatement,
|
||||
@ -260,7 +261,7 @@ module ts {
|
||||
FirstReservedWord = BreakKeyword,
|
||||
LastReservedWord = WithKeyword,
|
||||
FirstKeyword = BreakKeyword,
|
||||
LastKeyword = TypeKeyword,
|
||||
LastKeyword = OfKeyword,
|
||||
FirstFutureReservedWord = ImplementsKeyword,
|
||||
LastFutureReservedWord = YieldKeyword,
|
||||
FirstTypeNode = TypeReference,
|
||||
@ -753,6 +754,11 @@ module ts {
|
||||
expression: Expression;
|
||||
}
|
||||
|
||||
export interface ForOfStatement extends IterationStatement {
|
||||
initializer: VariableDeclarationList | Expression;
|
||||
expression: Expression;
|
||||
}
|
||||
|
||||
export interface BreakOrContinueStatement extends Statement {
|
||||
label?: Identifier;
|
||||
}
|
||||
|
||||
@ -343,6 +343,7 @@ module ts {
|
||||
case SyntaxKind.WhileStatement:
|
||||
case SyntaxKind.ForStatement:
|
||||
case SyntaxKind.ForInStatement:
|
||||
case SyntaxKind.ForOfStatement:
|
||||
case SyntaxKind.WithStatement:
|
||||
case SyntaxKind.SwitchStatement:
|
||||
case SyntaxKind.CaseClause:
|
||||
@ -560,7 +561,8 @@ module ts {
|
||||
forStatement.condition === node ||
|
||||
forStatement.iterator === node;
|
||||
case SyntaxKind.ForInStatement:
|
||||
var forInStatement = <ForInStatement>parent;
|
||||
case SyntaxKind.ForOfStatement:
|
||||
var forInStatement = <ForInStatement | ForOfStatement>parent;
|
||||
return (forInStatement.initializer === node && forInStatement.initializer.kind !== SyntaxKind.VariableDeclarationList) ||
|
||||
forInStatement.expression === node;
|
||||
case SyntaxKind.TypeAssertionExpression:
|
||||
@ -688,6 +690,7 @@ module ts {
|
||||
case SyntaxKind.ExpressionStatement:
|
||||
case SyntaxKind.EmptyStatement:
|
||||
case SyntaxKind.ForInStatement:
|
||||
case SyntaxKind.ForOfStatement:
|
||||
case SyntaxKind.ForStatement:
|
||||
case SyntaxKind.IfStatement:
|
||||
case SyntaxKind.LabeledStatement:
|
||||
|
||||
@ -151,8 +151,9 @@ module ts.BreakpointResolver {
|
||||
return spanInForStatement(<ForStatement>node);
|
||||
|
||||
case SyntaxKind.ForInStatement:
|
||||
case SyntaxKind.ForOfStatement:
|
||||
// span on for (a in ...)
|
||||
return textSpan(node, findNextToken((<ForInStatement>node).expression, node));
|
||||
return textSpan(node, findNextToken((<ForInStatement | ForOfStatement>node).expression, node));
|
||||
|
||||
case SyntaxKind.SwitchStatement:
|
||||
// span on switch(...)
|
||||
@ -261,7 +262,8 @@ module ts.BreakpointResolver {
|
||||
|
||||
function spanInVariableDeclaration(variableDeclaration: VariableDeclaration): TextSpan {
|
||||
// If declaration of for in statement, just set the span in parent
|
||||
if (variableDeclaration.parent.parent.kind === SyntaxKind.ForInStatement) {
|
||||
if (variableDeclaration.parent.parent.kind === SyntaxKind.ForInStatement ||
|
||||
variableDeclaration.parent.parent.kind === SyntaxKind.ForOfStatement) {
|
||||
return spanInNode(variableDeclaration.parent.parent);
|
||||
}
|
||||
|
||||
@ -362,6 +364,7 @@ module ts.BreakpointResolver {
|
||||
case SyntaxKind.WhileStatement:
|
||||
case SyntaxKind.IfStatement:
|
||||
case SyntaxKind.ForInStatement:
|
||||
case SyntaxKind.ForOfStatement:
|
||||
return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]);
|
||||
|
||||
// Set span on previous token if it starts on same line otherwise on the first statement of the block
|
||||
|
||||
@ -592,6 +592,7 @@ module ts.formatting {
|
||||
case SyntaxKind.SwitchStatement:
|
||||
case SyntaxKind.ForStatement:
|
||||
case SyntaxKind.ForInStatement:
|
||||
case SyntaxKind.ForOfStatement:
|
||||
case SyntaxKind.WhileStatement:
|
||||
case SyntaxKind.TryStatement:
|
||||
case SyntaxKind.DoStatement:
|
||||
|
||||
@ -359,6 +359,7 @@ module ts.formatting {
|
||||
case SyntaxKind.DoStatement:
|
||||
case SyntaxKind.WhileStatement:
|
||||
case SyntaxKind.ForInStatement:
|
||||
case SyntaxKind.ForOfStatement:
|
||||
case SyntaxKind.ForStatement:
|
||||
case SyntaxKind.IfStatement:
|
||||
case SyntaxKind.FunctionDeclaration:
|
||||
|
||||
@ -61,6 +61,7 @@ module ts {
|
||||
// to be the entire span of the parent.
|
||||
if (parent.kind === SyntaxKind.DoStatement ||
|
||||
parent.kind === SyntaxKind.ForInStatement ||
|
||||
parent.kind === SyntaxKind.ForOfStatement ||
|
||||
parent.kind === SyntaxKind.ForStatement ||
|
||||
parent.kind === SyntaxKind.IfStatement ||
|
||||
parent.kind === SyntaxKind.WhileStatement ||
|
||||
|
||||
@ -3441,7 +3441,9 @@ module ts {
|
||||
}
|
||||
break;
|
||||
case SyntaxKind.ForKeyword:
|
||||
if (hasKind(node.parent, SyntaxKind.ForStatement) || hasKind(node.parent, SyntaxKind.ForInStatement)) {
|
||||
if (hasKind(node.parent, SyntaxKind.ForStatement) ||
|
||||
hasKind(node.parent, SyntaxKind.ForInStatement) ||
|
||||
hasKind(node.parent, SyntaxKind.ForOfStatement)) {
|
||||
return getLoopBreakContinueOccurrences(<IterationStatement>node.parent);
|
||||
}
|
||||
break;
|
||||
@ -3718,6 +3720,7 @@ module ts {
|
||||
switch (owner.kind) {
|
||||
case SyntaxKind.ForStatement:
|
||||
case SyntaxKind.ForInStatement:
|
||||
case SyntaxKind.ForOfStatement:
|
||||
case SyntaxKind.DoStatement:
|
||||
case SyntaxKind.WhileStatement:
|
||||
return getLoopBreakContinueOccurrences(<IterationStatement>owner)
|
||||
@ -3762,6 +3765,7 @@ module ts {
|
||||
// Fall through.
|
||||
case SyntaxKind.ForStatement:
|
||||
case SyntaxKind.ForInStatement:
|
||||
case SyntaxKind.ForOfStatement:
|
||||
case SyntaxKind.WhileStatement:
|
||||
case SyntaxKind.DoStatement:
|
||||
if (!statement.label || isLabeledBy(node, statement.label.text)) {
|
||||
|
||||
@ -181,105 +181,107 @@ declare module "typescript" {
|
||||
StringKeyword = 119,
|
||||
SymbolKeyword = 120,
|
||||
TypeKeyword = 121,
|
||||
QualifiedName = 122,
|
||||
ComputedPropertyName = 123,
|
||||
TypeParameter = 124,
|
||||
Parameter = 125,
|
||||
PropertySignature = 126,
|
||||
PropertyDeclaration = 127,
|
||||
MethodSignature = 128,
|
||||
MethodDeclaration = 129,
|
||||
Constructor = 130,
|
||||
GetAccessor = 131,
|
||||
SetAccessor = 132,
|
||||
CallSignature = 133,
|
||||
ConstructSignature = 134,
|
||||
IndexSignature = 135,
|
||||
TypeReference = 136,
|
||||
FunctionType = 137,
|
||||
ConstructorType = 138,
|
||||
TypeQuery = 139,
|
||||
TypeLiteral = 140,
|
||||
ArrayType = 141,
|
||||
TupleType = 142,
|
||||
UnionType = 143,
|
||||
ParenthesizedType = 144,
|
||||
ObjectBindingPattern = 145,
|
||||
ArrayBindingPattern = 146,
|
||||
BindingElement = 147,
|
||||
ArrayLiteralExpression = 148,
|
||||
ObjectLiteralExpression = 149,
|
||||
PropertyAccessExpression = 150,
|
||||
ElementAccessExpression = 151,
|
||||
CallExpression = 152,
|
||||
NewExpression = 153,
|
||||
TaggedTemplateExpression = 154,
|
||||
TypeAssertionExpression = 155,
|
||||
ParenthesizedExpression = 156,
|
||||
FunctionExpression = 157,
|
||||
ArrowFunction = 158,
|
||||
DeleteExpression = 159,
|
||||
TypeOfExpression = 160,
|
||||
VoidExpression = 161,
|
||||
PrefixUnaryExpression = 162,
|
||||
PostfixUnaryExpression = 163,
|
||||
BinaryExpression = 164,
|
||||
ConditionalExpression = 165,
|
||||
TemplateExpression = 166,
|
||||
YieldExpression = 167,
|
||||
SpreadElementExpression = 168,
|
||||
OmittedExpression = 169,
|
||||
TemplateSpan = 170,
|
||||
Block = 171,
|
||||
VariableStatement = 172,
|
||||
EmptyStatement = 173,
|
||||
ExpressionStatement = 174,
|
||||
IfStatement = 175,
|
||||
DoStatement = 176,
|
||||
WhileStatement = 177,
|
||||
ForStatement = 178,
|
||||
ForInStatement = 179,
|
||||
ContinueStatement = 180,
|
||||
BreakStatement = 181,
|
||||
ReturnStatement = 182,
|
||||
WithStatement = 183,
|
||||
SwitchStatement = 184,
|
||||
LabeledStatement = 185,
|
||||
ThrowStatement = 186,
|
||||
TryStatement = 187,
|
||||
DebuggerStatement = 188,
|
||||
VariableDeclaration = 189,
|
||||
VariableDeclarationList = 190,
|
||||
FunctionDeclaration = 191,
|
||||
ClassDeclaration = 192,
|
||||
InterfaceDeclaration = 193,
|
||||
TypeAliasDeclaration = 194,
|
||||
EnumDeclaration = 195,
|
||||
ModuleDeclaration = 196,
|
||||
ModuleBlock = 197,
|
||||
ImportDeclaration = 198,
|
||||
ExportAssignment = 199,
|
||||
ExternalModuleReference = 200,
|
||||
CaseClause = 201,
|
||||
DefaultClause = 202,
|
||||
HeritageClause = 203,
|
||||
CatchClause = 204,
|
||||
PropertyAssignment = 205,
|
||||
ShorthandPropertyAssignment = 206,
|
||||
EnumMember = 207,
|
||||
SourceFile = 208,
|
||||
SyntaxList = 209,
|
||||
Count = 210,
|
||||
OfKeyword = 122,
|
||||
QualifiedName = 123,
|
||||
ComputedPropertyName = 124,
|
||||
TypeParameter = 125,
|
||||
Parameter = 126,
|
||||
PropertySignature = 127,
|
||||
PropertyDeclaration = 128,
|
||||
MethodSignature = 129,
|
||||
MethodDeclaration = 130,
|
||||
Constructor = 131,
|
||||
GetAccessor = 132,
|
||||
SetAccessor = 133,
|
||||
CallSignature = 134,
|
||||
ConstructSignature = 135,
|
||||
IndexSignature = 136,
|
||||
TypeReference = 137,
|
||||
FunctionType = 138,
|
||||
ConstructorType = 139,
|
||||
TypeQuery = 140,
|
||||
TypeLiteral = 141,
|
||||
ArrayType = 142,
|
||||
TupleType = 143,
|
||||
UnionType = 144,
|
||||
ParenthesizedType = 145,
|
||||
ObjectBindingPattern = 146,
|
||||
ArrayBindingPattern = 147,
|
||||
BindingElement = 148,
|
||||
ArrayLiteralExpression = 149,
|
||||
ObjectLiteralExpression = 150,
|
||||
PropertyAccessExpression = 151,
|
||||
ElementAccessExpression = 152,
|
||||
CallExpression = 153,
|
||||
NewExpression = 154,
|
||||
TaggedTemplateExpression = 155,
|
||||
TypeAssertionExpression = 156,
|
||||
ParenthesizedExpression = 157,
|
||||
FunctionExpression = 158,
|
||||
ArrowFunction = 159,
|
||||
DeleteExpression = 160,
|
||||
TypeOfExpression = 161,
|
||||
VoidExpression = 162,
|
||||
PrefixUnaryExpression = 163,
|
||||
PostfixUnaryExpression = 164,
|
||||
BinaryExpression = 165,
|
||||
ConditionalExpression = 166,
|
||||
TemplateExpression = 167,
|
||||
YieldExpression = 168,
|
||||
SpreadElementExpression = 169,
|
||||
OmittedExpression = 170,
|
||||
TemplateSpan = 171,
|
||||
Block = 172,
|
||||
VariableStatement = 173,
|
||||
EmptyStatement = 174,
|
||||
ExpressionStatement = 175,
|
||||
IfStatement = 176,
|
||||
DoStatement = 177,
|
||||
WhileStatement = 178,
|
||||
ForStatement = 179,
|
||||
ForInStatement = 180,
|
||||
ForOfStatement = 181,
|
||||
ContinueStatement = 182,
|
||||
BreakStatement = 183,
|
||||
ReturnStatement = 184,
|
||||
WithStatement = 185,
|
||||
SwitchStatement = 186,
|
||||
LabeledStatement = 187,
|
||||
ThrowStatement = 188,
|
||||
TryStatement = 189,
|
||||
DebuggerStatement = 190,
|
||||
VariableDeclaration = 191,
|
||||
VariableDeclarationList = 192,
|
||||
FunctionDeclaration = 193,
|
||||
ClassDeclaration = 194,
|
||||
InterfaceDeclaration = 195,
|
||||
TypeAliasDeclaration = 196,
|
||||
EnumDeclaration = 197,
|
||||
ModuleDeclaration = 198,
|
||||
ModuleBlock = 199,
|
||||
ImportDeclaration = 200,
|
||||
ExportAssignment = 201,
|
||||
ExternalModuleReference = 202,
|
||||
CaseClause = 203,
|
||||
DefaultClause = 204,
|
||||
HeritageClause = 205,
|
||||
CatchClause = 206,
|
||||
PropertyAssignment = 207,
|
||||
ShorthandPropertyAssignment = 208,
|
||||
EnumMember = 209,
|
||||
SourceFile = 210,
|
||||
SyntaxList = 211,
|
||||
Count = 212,
|
||||
FirstAssignment = 52,
|
||||
LastAssignment = 63,
|
||||
FirstReservedWord = 65,
|
||||
LastReservedWord = 100,
|
||||
FirstKeyword = 65,
|
||||
LastKeyword = 121,
|
||||
LastKeyword = 122,
|
||||
FirstFutureReservedWord = 101,
|
||||
LastFutureReservedWord = 109,
|
||||
FirstTypeNode = 136,
|
||||
LastTypeNode = 144,
|
||||
FirstTypeNode = 137,
|
||||
LastTypeNode = 145,
|
||||
FirstPunctuation = 14,
|
||||
LastPunctuation = 63,
|
||||
FirstToken = 0,
|
||||
@ -292,7 +294,7 @@ declare module "typescript" {
|
||||
LastTemplateToken = 13,
|
||||
FirstBinaryOperator = 24,
|
||||
LastBinaryOperator = 63,
|
||||
FirstNode = 122,
|
||||
FirstNode = 123,
|
||||
}
|
||||
const enum NodeFlags {
|
||||
Export = 1,
|
||||
@ -623,6 +625,10 @@ declare module "typescript" {
|
||||
initializer: VariableDeclarationList | Expression;
|
||||
expression: Expression;
|
||||
}
|
||||
interface ForOfStatement extends IterationStatement {
|
||||
initializer: VariableDeclarationList | Expression;
|
||||
expression: Expression;
|
||||
}
|
||||
interface BreakOrContinueStatement extends Statement {
|
||||
label?: Identifier;
|
||||
}
|
||||
|
||||
@ -559,271 +559,277 @@ declare module "typescript" {
|
||||
TypeKeyword = 121,
|
||||
>TypeKeyword : SyntaxKind
|
||||
|
||||
QualifiedName = 122,
|
||||
OfKeyword = 122,
|
||||
>OfKeyword : SyntaxKind
|
||||
|
||||
QualifiedName = 123,
|
||||
>QualifiedName : SyntaxKind
|
||||
|
||||
ComputedPropertyName = 123,
|
||||
ComputedPropertyName = 124,
|
||||
>ComputedPropertyName : SyntaxKind
|
||||
|
||||
TypeParameter = 124,
|
||||
TypeParameter = 125,
|
||||
>TypeParameter : SyntaxKind
|
||||
|
||||
Parameter = 125,
|
||||
Parameter = 126,
|
||||
>Parameter : SyntaxKind
|
||||
|
||||
PropertySignature = 126,
|
||||
PropertySignature = 127,
|
||||
>PropertySignature : SyntaxKind
|
||||
|
||||
PropertyDeclaration = 127,
|
||||
PropertyDeclaration = 128,
|
||||
>PropertyDeclaration : SyntaxKind
|
||||
|
||||
MethodSignature = 128,
|
||||
MethodSignature = 129,
|
||||
>MethodSignature : SyntaxKind
|
||||
|
||||
MethodDeclaration = 129,
|
||||
MethodDeclaration = 130,
|
||||
>MethodDeclaration : SyntaxKind
|
||||
|
||||
Constructor = 130,
|
||||
Constructor = 131,
|
||||
>Constructor : SyntaxKind
|
||||
|
||||
GetAccessor = 131,
|
||||
GetAccessor = 132,
|
||||
>GetAccessor : SyntaxKind
|
||||
|
||||
SetAccessor = 132,
|
||||
SetAccessor = 133,
|
||||
>SetAccessor : SyntaxKind
|
||||
|
||||
CallSignature = 133,
|
||||
CallSignature = 134,
|
||||
>CallSignature : SyntaxKind
|
||||
|
||||
ConstructSignature = 134,
|
||||
ConstructSignature = 135,
|
||||
>ConstructSignature : SyntaxKind
|
||||
|
||||
IndexSignature = 135,
|
||||
IndexSignature = 136,
|
||||
>IndexSignature : SyntaxKind
|
||||
|
||||
TypeReference = 136,
|
||||
TypeReference = 137,
|
||||
>TypeReference : SyntaxKind
|
||||
|
||||
FunctionType = 137,
|
||||
FunctionType = 138,
|
||||
>FunctionType : SyntaxKind
|
||||
|
||||
ConstructorType = 138,
|
||||
ConstructorType = 139,
|
||||
>ConstructorType : SyntaxKind
|
||||
|
||||
TypeQuery = 139,
|
||||
TypeQuery = 140,
|
||||
>TypeQuery : SyntaxKind
|
||||
|
||||
TypeLiteral = 140,
|
||||
TypeLiteral = 141,
|
||||
>TypeLiteral : SyntaxKind
|
||||
|
||||
ArrayType = 141,
|
||||
ArrayType = 142,
|
||||
>ArrayType : SyntaxKind
|
||||
|
||||
TupleType = 142,
|
||||
TupleType = 143,
|
||||
>TupleType : SyntaxKind
|
||||
|
||||
UnionType = 143,
|
||||
UnionType = 144,
|
||||
>UnionType : SyntaxKind
|
||||
|
||||
ParenthesizedType = 144,
|
||||
ParenthesizedType = 145,
|
||||
>ParenthesizedType : SyntaxKind
|
||||
|
||||
ObjectBindingPattern = 145,
|
||||
ObjectBindingPattern = 146,
|
||||
>ObjectBindingPattern : SyntaxKind
|
||||
|
||||
ArrayBindingPattern = 146,
|
||||
ArrayBindingPattern = 147,
|
||||
>ArrayBindingPattern : SyntaxKind
|
||||
|
||||
BindingElement = 147,
|
||||
BindingElement = 148,
|
||||
>BindingElement : SyntaxKind
|
||||
|
||||
ArrayLiteralExpression = 148,
|
||||
ArrayLiteralExpression = 149,
|
||||
>ArrayLiteralExpression : SyntaxKind
|
||||
|
||||
ObjectLiteralExpression = 149,
|
||||
ObjectLiteralExpression = 150,
|
||||
>ObjectLiteralExpression : SyntaxKind
|
||||
|
||||
PropertyAccessExpression = 150,
|
||||
PropertyAccessExpression = 151,
|
||||
>PropertyAccessExpression : SyntaxKind
|
||||
|
||||
ElementAccessExpression = 151,
|
||||
ElementAccessExpression = 152,
|
||||
>ElementAccessExpression : SyntaxKind
|
||||
|
||||
CallExpression = 152,
|
||||
CallExpression = 153,
|
||||
>CallExpression : SyntaxKind
|
||||
|
||||
NewExpression = 153,
|
||||
NewExpression = 154,
|
||||
>NewExpression : SyntaxKind
|
||||
|
||||
TaggedTemplateExpression = 154,
|
||||
TaggedTemplateExpression = 155,
|
||||
>TaggedTemplateExpression : SyntaxKind
|
||||
|
||||
TypeAssertionExpression = 155,
|
||||
TypeAssertionExpression = 156,
|
||||
>TypeAssertionExpression : SyntaxKind
|
||||
|
||||
ParenthesizedExpression = 156,
|
||||
ParenthesizedExpression = 157,
|
||||
>ParenthesizedExpression : SyntaxKind
|
||||
|
||||
FunctionExpression = 157,
|
||||
FunctionExpression = 158,
|
||||
>FunctionExpression : SyntaxKind
|
||||
|
||||
ArrowFunction = 158,
|
||||
ArrowFunction = 159,
|
||||
>ArrowFunction : SyntaxKind
|
||||
|
||||
DeleteExpression = 159,
|
||||
DeleteExpression = 160,
|
||||
>DeleteExpression : SyntaxKind
|
||||
|
||||
TypeOfExpression = 160,
|
||||
TypeOfExpression = 161,
|
||||
>TypeOfExpression : SyntaxKind
|
||||
|
||||
VoidExpression = 161,
|
||||
VoidExpression = 162,
|
||||
>VoidExpression : SyntaxKind
|
||||
|
||||
PrefixUnaryExpression = 162,
|
||||
PrefixUnaryExpression = 163,
|
||||
>PrefixUnaryExpression : SyntaxKind
|
||||
|
||||
PostfixUnaryExpression = 163,
|
||||
PostfixUnaryExpression = 164,
|
||||
>PostfixUnaryExpression : SyntaxKind
|
||||
|
||||
BinaryExpression = 164,
|
||||
BinaryExpression = 165,
|
||||
>BinaryExpression : SyntaxKind
|
||||
|
||||
ConditionalExpression = 165,
|
||||
ConditionalExpression = 166,
|
||||
>ConditionalExpression : SyntaxKind
|
||||
|
||||
TemplateExpression = 166,
|
||||
TemplateExpression = 167,
|
||||
>TemplateExpression : SyntaxKind
|
||||
|
||||
YieldExpression = 167,
|
||||
YieldExpression = 168,
|
||||
>YieldExpression : SyntaxKind
|
||||
|
||||
SpreadElementExpression = 168,
|
||||
SpreadElementExpression = 169,
|
||||
>SpreadElementExpression : SyntaxKind
|
||||
|
||||
OmittedExpression = 169,
|
||||
OmittedExpression = 170,
|
||||
>OmittedExpression : SyntaxKind
|
||||
|
||||
TemplateSpan = 170,
|
||||
TemplateSpan = 171,
|
||||
>TemplateSpan : SyntaxKind
|
||||
|
||||
Block = 171,
|
||||
Block = 172,
|
||||
>Block : SyntaxKind
|
||||
|
||||
VariableStatement = 172,
|
||||
VariableStatement = 173,
|
||||
>VariableStatement : SyntaxKind
|
||||
|
||||
EmptyStatement = 173,
|
||||
EmptyStatement = 174,
|
||||
>EmptyStatement : SyntaxKind
|
||||
|
||||
ExpressionStatement = 174,
|
||||
ExpressionStatement = 175,
|
||||
>ExpressionStatement : SyntaxKind
|
||||
|
||||
IfStatement = 175,
|
||||
IfStatement = 176,
|
||||
>IfStatement : SyntaxKind
|
||||
|
||||
DoStatement = 176,
|
||||
DoStatement = 177,
|
||||
>DoStatement : SyntaxKind
|
||||
|
||||
WhileStatement = 177,
|
||||
WhileStatement = 178,
|
||||
>WhileStatement : SyntaxKind
|
||||
|
||||
ForStatement = 178,
|
||||
ForStatement = 179,
|
||||
>ForStatement : SyntaxKind
|
||||
|
||||
ForInStatement = 179,
|
||||
ForInStatement = 180,
|
||||
>ForInStatement : SyntaxKind
|
||||
|
||||
ContinueStatement = 180,
|
||||
ForOfStatement = 181,
|
||||
>ForOfStatement : SyntaxKind
|
||||
|
||||
ContinueStatement = 182,
|
||||
>ContinueStatement : SyntaxKind
|
||||
|
||||
BreakStatement = 181,
|
||||
BreakStatement = 183,
|
||||
>BreakStatement : SyntaxKind
|
||||
|
||||
ReturnStatement = 182,
|
||||
ReturnStatement = 184,
|
||||
>ReturnStatement : SyntaxKind
|
||||
|
||||
WithStatement = 183,
|
||||
WithStatement = 185,
|
||||
>WithStatement : SyntaxKind
|
||||
|
||||
SwitchStatement = 184,
|
||||
SwitchStatement = 186,
|
||||
>SwitchStatement : SyntaxKind
|
||||
|
||||
LabeledStatement = 185,
|
||||
LabeledStatement = 187,
|
||||
>LabeledStatement : SyntaxKind
|
||||
|
||||
ThrowStatement = 186,
|
||||
ThrowStatement = 188,
|
||||
>ThrowStatement : SyntaxKind
|
||||
|
||||
TryStatement = 187,
|
||||
TryStatement = 189,
|
||||
>TryStatement : SyntaxKind
|
||||
|
||||
DebuggerStatement = 188,
|
||||
DebuggerStatement = 190,
|
||||
>DebuggerStatement : SyntaxKind
|
||||
|
||||
VariableDeclaration = 189,
|
||||
VariableDeclaration = 191,
|
||||
>VariableDeclaration : SyntaxKind
|
||||
|
||||
VariableDeclarationList = 190,
|
||||
VariableDeclarationList = 192,
|
||||
>VariableDeclarationList : SyntaxKind
|
||||
|
||||
FunctionDeclaration = 191,
|
||||
FunctionDeclaration = 193,
|
||||
>FunctionDeclaration : SyntaxKind
|
||||
|
||||
ClassDeclaration = 192,
|
||||
ClassDeclaration = 194,
|
||||
>ClassDeclaration : SyntaxKind
|
||||
|
||||
InterfaceDeclaration = 193,
|
||||
InterfaceDeclaration = 195,
|
||||
>InterfaceDeclaration : SyntaxKind
|
||||
|
||||
TypeAliasDeclaration = 194,
|
||||
TypeAliasDeclaration = 196,
|
||||
>TypeAliasDeclaration : SyntaxKind
|
||||
|
||||
EnumDeclaration = 195,
|
||||
EnumDeclaration = 197,
|
||||
>EnumDeclaration : SyntaxKind
|
||||
|
||||
ModuleDeclaration = 196,
|
||||
ModuleDeclaration = 198,
|
||||
>ModuleDeclaration : SyntaxKind
|
||||
|
||||
ModuleBlock = 197,
|
||||
ModuleBlock = 199,
|
||||
>ModuleBlock : SyntaxKind
|
||||
|
||||
ImportDeclaration = 198,
|
||||
ImportDeclaration = 200,
|
||||
>ImportDeclaration : SyntaxKind
|
||||
|
||||
ExportAssignment = 199,
|
||||
ExportAssignment = 201,
|
||||
>ExportAssignment : SyntaxKind
|
||||
|
||||
ExternalModuleReference = 200,
|
||||
ExternalModuleReference = 202,
|
||||
>ExternalModuleReference : SyntaxKind
|
||||
|
||||
CaseClause = 201,
|
||||
CaseClause = 203,
|
||||
>CaseClause : SyntaxKind
|
||||
|
||||
DefaultClause = 202,
|
||||
DefaultClause = 204,
|
||||
>DefaultClause : SyntaxKind
|
||||
|
||||
HeritageClause = 203,
|
||||
HeritageClause = 205,
|
||||
>HeritageClause : SyntaxKind
|
||||
|
||||
CatchClause = 204,
|
||||
CatchClause = 206,
|
||||
>CatchClause : SyntaxKind
|
||||
|
||||
PropertyAssignment = 205,
|
||||
PropertyAssignment = 207,
|
||||
>PropertyAssignment : SyntaxKind
|
||||
|
||||
ShorthandPropertyAssignment = 206,
|
||||
ShorthandPropertyAssignment = 208,
|
||||
>ShorthandPropertyAssignment : SyntaxKind
|
||||
|
||||
EnumMember = 207,
|
||||
EnumMember = 209,
|
||||
>EnumMember : SyntaxKind
|
||||
|
||||
SourceFile = 208,
|
||||
SourceFile = 210,
|
||||
>SourceFile : SyntaxKind
|
||||
|
||||
SyntaxList = 209,
|
||||
SyntaxList = 211,
|
||||
>SyntaxList : SyntaxKind
|
||||
|
||||
Count = 210,
|
||||
Count = 212,
|
||||
>Count : SyntaxKind
|
||||
|
||||
FirstAssignment = 52,
|
||||
@ -841,7 +847,7 @@ declare module "typescript" {
|
||||
FirstKeyword = 65,
|
||||
>FirstKeyword : SyntaxKind
|
||||
|
||||
LastKeyword = 121,
|
||||
LastKeyword = 122,
|
||||
>LastKeyword : SyntaxKind
|
||||
|
||||
FirstFutureReservedWord = 101,
|
||||
@ -850,10 +856,10 @@ declare module "typescript" {
|
||||
LastFutureReservedWord = 109,
|
||||
>LastFutureReservedWord : SyntaxKind
|
||||
|
||||
FirstTypeNode = 136,
|
||||
FirstTypeNode = 137,
|
||||
>FirstTypeNode : SyntaxKind
|
||||
|
||||
LastTypeNode = 144,
|
||||
LastTypeNode = 145,
|
||||
>LastTypeNode : SyntaxKind
|
||||
|
||||
FirstPunctuation = 14,
|
||||
@ -892,7 +898,7 @@ declare module "typescript" {
|
||||
LastBinaryOperator = 63,
|
||||
>LastBinaryOperator : SyntaxKind
|
||||
|
||||
FirstNode = 122,
|
||||
FirstNode = 123,
|
||||
>FirstNode : SyntaxKind
|
||||
}
|
||||
const enum NodeFlags {
|
||||
@ -1873,6 +1879,19 @@ declare module "typescript" {
|
||||
|
||||
expression: Expression;
|
||||
>expression : Expression
|
||||
>Expression : Expression
|
||||
}
|
||||
interface ForOfStatement extends IterationStatement {
|
||||
>ForOfStatement : ForOfStatement
|
||||
>IterationStatement : IterationStatement
|
||||
|
||||
initializer: VariableDeclarationList | Expression;
|
||||
>initializer : Expression | VariableDeclarationList
|
||||
>VariableDeclarationList : VariableDeclarationList
|
||||
>Expression : Expression
|
||||
|
||||
expression: Expression;
|
||||
>expression : Expression
|
||||
>Expression : Expression
|
||||
}
|
||||
interface BreakOrContinueStatement extends Statement {
|
||||
|
||||
@ -212,105 +212,107 @@ declare module "typescript" {
|
||||
StringKeyword = 119,
|
||||
SymbolKeyword = 120,
|
||||
TypeKeyword = 121,
|
||||
QualifiedName = 122,
|
||||
ComputedPropertyName = 123,
|
||||
TypeParameter = 124,
|
||||
Parameter = 125,
|
||||
PropertySignature = 126,
|
||||
PropertyDeclaration = 127,
|
||||
MethodSignature = 128,
|
||||
MethodDeclaration = 129,
|
||||
Constructor = 130,
|
||||
GetAccessor = 131,
|
||||
SetAccessor = 132,
|
||||
CallSignature = 133,
|
||||
ConstructSignature = 134,
|
||||
IndexSignature = 135,
|
||||
TypeReference = 136,
|
||||
FunctionType = 137,
|
||||
ConstructorType = 138,
|
||||
TypeQuery = 139,
|
||||
TypeLiteral = 140,
|
||||
ArrayType = 141,
|
||||
TupleType = 142,
|
||||
UnionType = 143,
|
||||
ParenthesizedType = 144,
|
||||
ObjectBindingPattern = 145,
|
||||
ArrayBindingPattern = 146,
|
||||
BindingElement = 147,
|
||||
ArrayLiteralExpression = 148,
|
||||
ObjectLiteralExpression = 149,
|
||||
PropertyAccessExpression = 150,
|
||||
ElementAccessExpression = 151,
|
||||
CallExpression = 152,
|
||||
NewExpression = 153,
|
||||
TaggedTemplateExpression = 154,
|
||||
TypeAssertionExpression = 155,
|
||||
ParenthesizedExpression = 156,
|
||||
FunctionExpression = 157,
|
||||
ArrowFunction = 158,
|
||||
DeleteExpression = 159,
|
||||
TypeOfExpression = 160,
|
||||
VoidExpression = 161,
|
||||
PrefixUnaryExpression = 162,
|
||||
PostfixUnaryExpression = 163,
|
||||
BinaryExpression = 164,
|
||||
ConditionalExpression = 165,
|
||||
TemplateExpression = 166,
|
||||
YieldExpression = 167,
|
||||
SpreadElementExpression = 168,
|
||||
OmittedExpression = 169,
|
||||
TemplateSpan = 170,
|
||||
Block = 171,
|
||||
VariableStatement = 172,
|
||||
EmptyStatement = 173,
|
||||
ExpressionStatement = 174,
|
||||
IfStatement = 175,
|
||||
DoStatement = 176,
|
||||
WhileStatement = 177,
|
||||
ForStatement = 178,
|
||||
ForInStatement = 179,
|
||||
ContinueStatement = 180,
|
||||
BreakStatement = 181,
|
||||
ReturnStatement = 182,
|
||||
WithStatement = 183,
|
||||
SwitchStatement = 184,
|
||||
LabeledStatement = 185,
|
||||
ThrowStatement = 186,
|
||||
TryStatement = 187,
|
||||
DebuggerStatement = 188,
|
||||
VariableDeclaration = 189,
|
||||
VariableDeclarationList = 190,
|
||||
FunctionDeclaration = 191,
|
||||
ClassDeclaration = 192,
|
||||
InterfaceDeclaration = 193,
|
||||
TypeAliasDeclaration = 194,
|
||||
EnumDeclaration = 195,
|
||||
ModuleDeclaration = 196,
|
||||
ModuleBlock = 197,
|
||||
ImportDeclaration = 198,
|
||||
ExportAssignment = 199,
|
||||
ExternalModuleReference = 200,
|
||||
CaseClause = 201,
|
||||
DefaultClause = 202,
|
||||
HeritageClause = 203,
|
||||
CatchClause = 204,
|
||||
PropertyAssignment = 205,
|
||||
ShorthandPropertyAssignment = 206,
|
||||
EnumMember = 207,
|
||||
SourceFile = 208,
|
||||
SyntaxList = 209,
|
||||
Count = 210,
|
||||
OfKeyword = 122,
|
||||
QualifiedName = 123,
|
||||
ComputedPropertyName = 124,
|
||||
TypeParameter = 125,
|
||||
Parameter = 126,
|
||||
PropertySignature = 127,
|
||||
PropertyDeclaration = 128,
|
||||
MethodSignature = 129,
|
||||
MethodDeclaration = 130,
|
||||
Constructor = 131,
|
||||
GetAccessor = 132,
|
||||
SetAccessor = 133,
|
||||
CallSignature = 134,
|
||||
ConstructSignature = 135,
|
||||
IndexSignature = 136,
|
||||
TypeReference = 137,
|
||||
FunctionType = 138,
|
||||
ConstructorType = 139,
|
||||
TypeQuery = 140,
|
||||
TypeLiteral = 141,
|
||||
ArrayType = 142,
|
||||
TupleType = 143,
|
||||
UnionType = 144,
|
||||
ParenthesizedType = 145,
|
||||
ObjectBindingPattern = 146,
|
||||
ArrayBindingPattern = 147,
|
||||
BindingElement = 148,
|
||||
ArrayLiteralExpression = 149,
|
||||
ObjectLiteralExpression = 150,
|
||||
PropertyAccessExpression = 151,
|
||||
ElementAccessExpression = 152,
|
||||
CallExpression = 153,
|
||||
NewExpression = 154,
|
||||
TaggedTemplateExpression = 155,
|
||||
TypeAssertionExpression = 156,
|
||||
ParenthesizedExpression = 157,
|
||||
FunctionExpression = 158,
|
||||
ArrowFunction = 159,
|
||||
DeleteExpression = 160,
|
||||
TypeOfExpression = 161,
|
||||
VoidExpression = 162,
|
||||
PrefixUnaryExpression = 163,
|
||||
PostfixUnaryExpression = 164,
|
||||
BinaryExpression = 165,
|
||||
ConditionalExpression = 166,
|
||||
TemplateExpression = 167,
|
||||
YieldExpression = 168,
|
||||
SpreadElementExpression = 169,
|
||||
OmittedExpression = 170,
|
||||
TemplateSpan = 171,
|
||||
Block = 172,
|
||||
VariableStatement = 173,
|
||||
EmptyStatement = 174,
|
||||
ExpressionStatement = 175,
|
||||
IfStatement = 176,
|
||||
DoStatement = 177,
|
||||
WhileStatement = 178,
|
||||
ForStatement = 179,
|
||||
ForInStatement = 180,
|
||||
ForOfStatement = 181,
|
||||
ContinueStatement = 182,
|
||||
BreakStatement = 183,
|
||||
ReturnStatement = 184,
|
||||
WithStatement = 185,
|
||||
SwitchStatement = 186,
|
||||
LabeledStatement = 187,
|
||||
ThrowStatement = 188,
|
||||
TryStatement = 189,
|
||||
DebuggerStatement = 190,
|
||||
VariableDeclaration = 191,
|
||||
VariableDeclarationList = 192,
|
||||
FunctionDeclaration = 193,
|
||||
ClassDeclaration = 194,
|
||||
InterfaceDeclaration = 195,
|
||||
TypeAliasDeclaration = 196,
|
||||
EnumDeclaration = 197,
|
||||
ModuleDeclaration = 198,
|
||||
ModuleBlock = 199,
|
||||
ImportDeclaration = 200,
|
||||
ExportAssignment = 201,
|
||||
ExternalModuleReference = 202,
|
||||
CaseClause = 203,
|
||||
DefaultClause = 204,
|
||||
HeritageClause = 205,
|
||||
CatchClause = 206,
|
||||
PropertyAssignment = 207,
|
||||
ShorthandPropertyAssignment = 208,
|
||||
EnumMember = 209,
|
||||
SourceFile = 210,
|
||||
SyntaxList = 211,
|
||||
Count = 212,
|
||||
FirstAssignment = 52,
|
||||
LastAssignment = 63,
|
||||
FirstReservedWord = 65,
|
||||
LastReservedWord = 100,
|
||||
FirstKeyword = 65,
|
||||
LastKeyword = 121,
|
||||
LastKeyword = 122,
|
||||
FirstFutureReservedWord = 101,
|
||||
LastFutureReservedWord = 109,
|
||||
FirstTypeNode = 136,
|
||||
LastTypeNode = 144,
|
||||
FirstTypeNode = 137,
|
||||
LastTypeNode = 145,
|
||||
FirstPunctuation = 14,
|
||||
LastPunctuation = 63,
|
||||
FirstToken = 0,
|
||||
@ -323,7 +325,7 @@ declare module "typescript" {
|
||||
LastTemplateToken = 13,
|
||||
FirstBinaryOperator = 24,
|
||||
LastBinaryOperator = 63,
|
||||
FirstNode = 122,
|
||||
FirstNode = 123,
|
||||
}
|
||||
const enum NodeFlags {
|
||||
Export = 1,
|
||||
@ -654,6 +656,10 @@ declare module "typescript" {
|
||||
initializer: VariableDeclarationList | Expression;
|
||||
expression: Expression;
|
||||
}
|
||||
interface ForOfStatement extends IterationStatement {
|
||||
initializer: VariableDeclarationList | Expression;
|
||||
expression: Expression;
|
||||
}
|
||||
interface BreakOrContinueStatement extends Statement {
|
||||
label?: Identifier;
|
||||
}
|
||||
@ -1978,24 +1984,24 @@ function delint(sourceFile) {
|
||||
delintNode(sourceFile);
|
||||
function delintNode(node) {
|
||||
switch (node.kind) {
|
||||
case 178 /* ForStatement */:
|
||||
case 179 /* ForInStatement */:
|
||||
case 177 /* WhileStatement */:
|
||||
case 176 /* DoStatement */:
|
||||
if (node.statement.kind !== 171 /* Block */) {
|
||||
case 179 /* ForStatement */:
|
||||
case 180 /* ForInStatement */:
|
||||
case 178 /* WhileStatement */:
|
||||
case 177 /* DoStatement */:
|
||||
if (node.statement.kind !== 172 /* Block */) {
|
||||
report(node, "A looping statement's contents should be wrapped in a block body.");
|
||||
}
|
||||
break;
|
||||
case 175 /* IfStatement */:
|
||||
case 176 /* IfStatement */:
|
||||
var ifStatement = node;
|
||||
if (ifStatement.thenStatement.kind !== 171 /* Block */) {
|
||||
if (ifStatement.thenStatement.kind !== 172 /* Block */) {
|
||||
report(ifStatement.thenStatement, "An if statement's contents should be wrapped in a block body.");
|
||||
}
|
||||
if (ifStatement.elseStatement && ifStatement.elseStatement.kind !== 171 /* Block */ && ifStatement.elseStatement.kind !== 175 /* IfStatement */) {
|
||||
if (ifStatement.elseStatement && ifStatement.elseStatement.kind !== 172 /* Block */ && ifStatement.elseStatement.kind !== 176 /* IfStatement */) {
|
||||
report(ifStatement.elseStatement, "An else statement's contents should be wrapped in a block body.");
|
||||
}
|
||||
break;
|
||||
case 164 /* BinaryExpression */:
|
||||
case 165 /* BinaryExpression */:
|
||||
var op = node.operator;
|
||||
if (op === 28 /* EqualsEqualsToken */ || op === 29 /* ExclamationEqualsToken */) {
|
||||
report(node, "Use '===' and '!=='.");
|
||||
|
||||
@ -703,271 +703,277 @@ declare module "typescript" {
|
||||
TypeKeyword = 121,
|
||||
>TypeKeyword : SyntaxKind
|
||||
|
||||
QualifiedName = 122,
|
||||
OfKeyword = 122,
|
||||
>OfKeyword : SyntaxKind
|
||||
|
||||
QualifiedName = 123,
|
||||
>QualifiedName : SyntaxKind
|
||||
|
||||
ComputedPropertyName = 123,
|
||||
ComputedPropertyName = 124,
|
||||
>ComputedPropertyName : SyntaxKind
|
||||
|
||||
TypeParameter = 124,
|
||||
TypeParameter = 125,
|
||||
>TypeParameter : SyntaxKind
|
||||
|
||||
Parameter = 125,
|
||||
Parameter = 126,
|
||||
>Parameter : SyntaxKind
|
||||
|
||||
PropertySignature = 126,
|
||||
PropertySignature = 127,
|
||||
>PropertySignature : SyntaxKind
|
||||
|
||||
PropertyDeclaration = 127,
|
||||
PropertyDeclaration = 128,
|
||||
>PropertyDeclaration : SyntaxKind
|
||||
|
||||
MethodSignature = 128,
|
||||
MethodSignature = 129,
|
||||
>MethodSignature : SyntaxKind
|
||||
|
||||
MethodDeclaration = 129,
|
||||
MethodDeclaration = 130,
|
||||
>MethodDeclaration : SyntaxKind
|
||||
|
||||
Constructor = 130,
|
||||
Constructor = 131,
|
||||
>Constructor : SyntaxKind
|
||||
|
||||
GetAccessor = 131,
|
||||
GetAccessor = 132,
|
||||
>GetAccessor : SyntaxKind
|
||||
|
||||
SetAccessor = 132,
|
||||
SetAccessor = 133,
|
||||
>SetAccessor : SyntaxKind
|
||||
|
||||
CallSignature = 133,
|
||||
CallSignature = 134,
|
||||
>CallSignature : SyntaxKind
|
||||
|
||||
ConstructSignature = 134,
|
||||
ConstructSignature = 135,
|
||||
>ConstructSignature : SyntaxKind
|
||||
|
||||
IndexSignature = 135,
|
||||
IndexSignature = 136,
|
||||
>IndexSignature : SyntaxKind
|
||||
|
||||
TypeReference = 136,
|
||||
TypeReference = 137,
|
||||
>TypeReference : SyntaxKind
|
||||
|
||||
FunctionType = 137,
|
||||
FunctionType = 138,
|
||||
>FunctionType : SyntaxKind
|
||||
|
||||
ConstructorType = 138,
|
||||
ConstructorType = 139,
|
||||
>ConstructorType : SyntaxKind
|
||||
|
||||
TypeQuery = 139,
|
||||
TypeQuery = 140,
|
||||
>TypeQuery : SyntaxKind
|
||||
|
||||
TypeLiteral = 140,
|
||||
TypeLiteral = 141,
|
||||
>TypeLiteral : SyntaxKind
|
||||
|
||||
ArrayType = 141,
|
||||
ArrayType = 142,
|
||||
>ArrayType : SyntaxKind
|
||||
|
||||
TupleType = 142,
|
||||
TupleType = 143,
|
||||
>TupleType : SyntaxKind
|
||||
|
||||
UnionType = 143,
|
||||
UnionType = 144,
|
||||
>UnionType : SyntaxKind
|
||||
|
||||
ParenthesizedType = 144,
|
||||
ParenthesizedType = 145,
|
||||
>ParenthesizedType : SyntaxKind
|
||||
|
||||
ObjectBindingPattern = 145,
|
||||
ObjectBindingPattern = 146,
|
||||
>ObjectBindingPattern : SyntaxKind
|
||||
|
||||
ArrayBindingPattern = 146,
|
||||
ArrayBindingPattern = 147,
|
||||
>ArrayBindingPattern : SyntaxKind
|
||||
|
||||
BindingElement = 147,
|
||||
BindingElement = 148,
|
||||
>BindingElement : SyntaxKind
|
||||
|
||||
ArrayLiteralExpression = 148,
|
||||
ArrayLiteralExpression = 149,
|
||||
>ArrayLiteralExpression : SyntaxKind
|
||||
|
||||
ObjectLiteralExpression = 149,
|
||||
ObjectLiteralExpression = 150,
|
||||
>ObjectLiteralExpression : SyntaxKind
|
||||
|
||||
PropertyAccessExpression = 150,
|
||||
PropertyAccessExpression = 151,
|
||||
>PropertyAccessExpression : SyntaxKind
|
||||
|
||||
ElementAccessExpression = 151,
|
||||
ElementAccessExpression = 152,
|
||||
>ElementAccessExpression : SyntaxKind
|
||||
|
||||
CallExpression = 152,
|
||||
CallExpression = 153,
|
||||
>CallExpression : SyntaxKind
|
||||
|
||||
NewExpression = 153,
|
||||
NewExpression = 154,
|
||||
>NewExpression : SyntaxKind
|
||||
|
||||
TaggedTemplateExpression = 154,
|
||||
TaggedTemplateExpression = 155,
|
||||
>TaggedTemplateExpression : SyntaxKind
|
||||
|
||||
TypeAssertionExpression = 155,
|
||||
TypeAssertionExpression = 156,
|
||||
>TypeAssertionExpression : SyntaxKind
|
||||
|
||||
ParenthesizedExpression = 156,
|
||||
ParenthesizedExpression = 157,
|
||||
>ParenthesizedExpression : SyntaxKind
|
||||
|
||||
FunctionExpression = 157,
|
||||
FunctionExpression = 158,
|
||||
>FunctionExpression : SyntaxKind
|
||||
|
||||
ArrowFunction = 158,
|
||||
ArrowFunction = 159,
|
||||
>ArrowFunction : SyntaxKind
|
||||
|
||||
DeleteExpression = 159,
|
||||
DeleteExpression = 160,
|
||||
>DeleteExpression : SyntaxKind
|
||||
|
||||
TypeOfExpression = 160,
|
||||
TypeOfExpression = 161,
|
||||
>TypeOfExpression : SyntaxKind
|
||||
|
||||
VoidExpression = 161,
|
||||
VoidExpression = 162,
|
||||
>VoidExpression : SyntaxKind
|
||||
|
||||
PrefixUnaryExpression = 162,
|
||||
PrefixUnaryExpression = 163,
|
||||
>PrefixUnaryExpression : SyntaxKind
|
||||
|
||||
PostfixUnaryExpression = 163,
|
||||
PostfixUnaryExpression = 164,
|
||||
>PostfixUnaryExpression : SyntaxKind
|
||||
|
||||
BinaryExpression = 164,
|
||||
BinaryExpression = 165,
|
||||
>BinaryExpression : SyntaxKind
|
||||
|
||||
ConditionalExpression = 165,
|
||||
ConditionalExpression = 166,
|
||||
>ConditionalExpression : SyntaxKind
|
||||
|
||||
TemplateExpression = 166,
|
||||
TemplateExpression = 167,
|
||||
>TemplateExpression : SyntaxKind
|
||||
|
||||
YieldExpression = 167,
|
||||
YieldExpression = 168,
|
||||
>YieldExpression : SyntaxKind
|
||||
|
||||
SpreadElementExpression = 168,
|
||||
SpreadElementExpression = 169,
|
||||
>SpreadElementExpression : SyntaxKind
|
||||
|
||||
OmittedExpression = 169,
|
||||
OmittedExpression = 170,
|
||||
>OmittedExpression : SyntaxKind
|
||||
|
||||
TemplateSpan = 170,
|
||||
TemplateSpan = 171,
|
||||
>TemplateSpan : SyntaxKind
|
||||
|
||||
Block = 171,
|
||||
Block = 172,
|
||||
>Block : SyntaxKind
|
||||
|
||||
VariableStatement = 172,
|
||||
VariableStatement = 173,
|
||||
>VariableStatement : SyntaxKind
|
||||
|
||||
EmptyStatement = 173,
|
||||
EmptyStatement = 174,
|
||||
>EmptyStatement : SyntaxKind
|
||||
|
||||
ExpressionStatement = 174,
|
||||
ExpressionStatement = 175,
|
||||
>ExpressionStatement : SyntaxKind
|
||||
|
||||
IfStatement = 175,
|
||||
IfStatement = 176,
|
||||
>IfStatement : SyntaxKind
|
||||
|
||||
DoStatement = 176,
|
||||
DoStatement = 177,
|
||||
>DoStatement : SyntaxKind
|
||||
|
||||
WhileStatement = 177,
|
||||
WhileStatement = 178,
|
||||
>WhileStatement : SyntaxKind
|
||||
|
||||
ForStatement = 178,
|
||||
ForStatement = 179,
|
||||
>ForStatement : SyntaxKind
|
||||
|
||||
ForInStatement = 179,
|
||||
ForInStatement = 180,
|
||||
>ForInStatement : SyntaxKind
|
||||
|
||||
ContinueStatement = 180,
|
||||
ForOfStatement = 181,
|
||||
>ForOfStatement : SyntaxKind
|
||||
|
||||
ContinueStatement = 182,
|
||||
>ContinueStatement : SyntaxKind
|
||||
|
||||
BreakStatement = 181,
|
||||
BreakStatement = 183,
|
||||
>BreakStatement : SyntaxKind
|
||||
|
||||
ReturnStatement = 182,
|
||||
ReturnStatement = 184,
|
||||
>ReturnStatement : SyntaxKind
|
||||
|
||||
WithStatement = 183,
|
||||
WithStatement = 185,
|
||||
>WithStatement : SyntaxKind
|
||||
|
||||
SwitchStatement = 184,
|
||||
SwitchStatement = 186,
|
||||
>SwitchStatement : SyntaxKind
|
||||
|
||||
LabeledStatement = 185,
|
||||
LabeledStatement = 187,
|
||||
>LabeledStatement : SyntaxKind
|
||||
|
||||
ThrowStatement = 186,
|
||||
ThrowStatement = 188,
|
||||
>ThrowStatement : SyntaxKind
|
||||
|
||||
TryStatement = 187,
|
||||
TryStatement = 189,
|
||||
>TryStatement : SyntaxKind
|
||||
|
||||
DebuggerStatement = 188,
|
||||
DebuggerStatement = 190,
|
||||
>DebuggerStatement : SyntaxKind
|
||||
|
||||
VariableDeclaration = 189,
|
||||
VariableDeclaration = 191,
|
||||
>VariableDeclaration : SyntaxKind
|
||||
|
||||
VariableDeclarationList = 190,
|
||||
VariableDeclarationList = 192,
|
||||
>VariableDeclarationList : SyntaxKind
|
||||
|
||||
FunctionDeclaration = 191,
|
||||
FunctionDeclaration = 193,
|
||||
>FunctionDeclaration : SyntaxKind
|
||||
|
||||
ClassDeclaration = 192,
|
||||
ClassDeclaration = 194,
|
||||
>ClassDeclaration : SyntaxKind
|
||||
|
||||
InterfaceDeclaration = 193,
|
||||
InterfaceDeclaration = 195,
|
||||
>InterfaceDeclaration : SyntaxKind
|
||||
|
||||
TypeAliasDeclaration = 194,
|
||||
TypeAliasDeclaration = 196,
|
||||
>TypeAliasDeclaration : SyntaxKind
|
||||
|
||||
EnumDeclaration = 195,
|
||||
EnumDeclaration = 197,
|
||||
>EnumDeclaration : SyntaxKind
|
||||
|
||||
ModuleDeclaration = 196,
|
||||
ModuleDeclaration = 198,
|
||||
>ModuleDeclaration : SyntaxKind
|
||||
|
||||
ModuleBlock = 197,
|
||||
ModuleBlock = 199,
|
||||
>ModuleBlock : SyntaxKind
|
||||
|
||||
ImportDeclaration = 198,
|
||||
ImportDeclaration = 200,
|
||||
>ImportDeclaration : SyntaxKind
|
||||
|
||||
ExportAssignment = 199,
|
||||
ExportAssignment = 201,
|
||||
>ExportAssignment : SyntaxKind
|
||||
|
||||
ExternalModuleReference = 200,
|
||||
ExternalModuleReference = 202,
|
||||
>ExternalModuleReference : SyntaxKind
|
||||
|
||||
CaseClause = 201,
|
||||
CaseClause = 203,
|
||||
>CaseClause : SyntaxKind
|
||||
|
||||
DefaultClause = 202,
|
||||
DefaultClause = 204,
|
||||
>DefaultClause : SyntaxKind
|
||||
|
||||
HeritageClause = 203,
|
||||
HeritageClause = 205,
|
||||
>HeritageClause : SyntaxKind
|
||||
|
||||
CatchClause = 204,
|
||||
CatchClause = 206,
|
||||
>CatchClause : SyntaxKind
|
||||
|
||||
PropertyAssignment = 205,
|
||||
PropertyAssignment = 207,
|
||||
>PropertyAssignment : SyntaxKind
|
||||
|
||||
ShorthandPropertyAssignment = 206,
|
||||
ShorthandPropertyAssignment = 208,
|
||||
>ShorthandPropertyAssignment : SyntaxKind
|
||||
|
||||
EnumMember = 207,
|
||||
EnumMember = 209,
|
||||
>EnumMember : SyntaxKind
|
||||
|
||||
SourceFile = 208,
|
||||
SourceFile = 210,
|
||||
>SourceFile : SyntaxKind
|
||||
|
||||
SyntaxList = 209,
|
||||
SyntaxList = 211,
|
||||
>SyntaxList : SyntaxKind
|
||||
|
||||
Count = 210,
|
||||
Count = 212,
|
||||
>Count : SyntaxKind
|
||||
|
||||
FirstAssignment = 52,
|
||||
@ -985,7 +991,7 @@ declare module "typescript" {
|
||||
FirstKeyword = 65,
|
||||
>FirstKeyword : SyntaxKind
|
||||
|
||||
LastKeyword = 121,
|
||||
LastKeyword = 122,
|
||||
>LastKeyword : SyntaxKind
|
||||
|
||||
FirstFutureReservedWord = 101,
|
||||
@ -994,10 +1000,10 @@ declare module "typescript" {
|
||||
LastFutureReservedWord = 109,
|
||||
>LastFutureReservedWord : SyntaxKind
|
||||
|
||||
FirstTypeNode = 136,
|
||||
FirstTypeNode = 137,
|
||||
>FirstTypeNode : SyntaxKind
|
||||
|
||||
LastTypeNode = 144,
|
||||
LastTypeNode = 145,
|
||||
>LastTypeNode : SyntaxKind
|
||||
|
||||
FirstPunctuation = 14,
|
||||
@ -1036,7 +1042,7 @@ declare module "typescript" {
|
||||
LastBinaryOperator = 63,
|
||||
>LastBinaryOperator : SyntaxKind
|
||||
|
||||
FirstNode = 122,
|
||||
FirstNode = 123,
|
||||
>FirstNode : SyntaxKind
|
||||
}
|
||||
const enum NodeFlags {
|
||||
@ -2017,6 +2023,19 @@ declare module "typescript" {
|
||||
|
||||
expression: Expression;
|
||||
>expression : Expression
|
||||
>Expression : Expression
|
||||
}
|
||||
interface ForOfStatement extends IterationStatement {
|
||||
>ForOfStatement : ForOfStatement
|
||||
>IterationStatement : IterationStatement
|
||||
|
||||
initializer: VariableDeclarationList | Expression;
|
||||
>initializer : Expression | VariableDeclarationList
|
||||
>VariableDeclarationList : VariableDeclarationList
|
||||
>Expression : Expression
|
||||
|
||||
expression: Expression;
|
||||
>expression : Expression
|
||||
>Expression : Expression
|
||||
}
|
||||
interface BreakOrContinueStatement extends Statement {
|
||||
|
||||
@ -213,105 +213,107 @@ declare module "typescript" {
|
||||
StringKeyword = 119,
|
||||
SymbolKeyword = 120,
|
||||
TypeKeyword = 121,
|
||||
QualifiedName = 122,
|
||||
ComputedPropertyName = 123,
|
||||
TypeParameter = 124,
|
||||
Parameter = 125,
|
||||
PropertySignature = 126,
|
||||
PropertyDeclaration = 127,
|
||||
MethodSignature = 128,
|
||||
MethodDeclaration = 129,
|
||||
Constructor = 130,
|
||||
GetAccessor = 131,
|
||||
SetAccessor = 132,
|
||||
CallSignature = 133,
|
||||
ConstructSignature = 134,
|
||||
IndexSignature = 135,
|
||||
TypeReference = 136,
|
||||
FunctionType = 137,
|
||||
ConstructorType = 138,
|
||||
TypeQuery = 139,
|
||||
TypeLiteral = 140,
|
||||
ArrayType = 141,
|
||||
TupleType = 142,
|
||||
UnionType = 143,
|
||||
ParenthesizedType = 144,
|
||||
ObjectBindingPattern = 145,
|
||||
ArrayBindingPattern = 146,
|
||||
BindingElement = 147,
|
||||
ArrayLiteralExpression = 148,
|
||||
ObjectLiteralExpression = 149,
|
||||
PropertyAccessExpression = 150,
|
||||
ElementAccessExpression = 151,
|
||||
CallExpression = 152,
|
||||
NewExpression = 153,
|
||||
TaggedTemplateExpression = 154,
|
||||
TypeAssertionExpression = 155,
|
||||
ParenthesizedExpression = 156,
|
||||
FunctionExpression = 157,
|
||||
ArrowFunction = 158,
|
||||
DeleteExpression = 159,
|
||||
TypeOfExpression = 160,
|
||||
VoidExpression = 161,
|
||||
PrefixUnaryExpression = 162,
|
||||
PostfixUnaryExpression = 163,
|
||||
BinaryExpression = 164,
|
||||
ConditionalExpression = 165,
|
||||
TemplateExpression = 166,
|
||||
YieldExpression = 167,
|
||||
SpreadElementExpression = 168,
|
||||
OmittedExpression = 169,
|
||||
TemplateSpan = 170,
|
||||
Block = 171,
|
||||
VariableStatement = 172,
|
||||
EmptyStatement = 173,
|
||||
ExpressionStatement = 174,
|
||||
IfStatement = 175,
|
||||
DoStatement = 176,
|
||||
WhileStatement = 177,
|
||||
ForStatement = 178,
|
||||
ForInStatement = 179,
|
||||
ContinueStatement = 180,
|
||||
BreakStatement = 181,
|
||||
ReturnStatement = 182,
|
||||
WithStatement = 183,
|
||||
SwitchStatement = 184,
|
||||
LabeledStatement = 185,
|
||||
ThrowStatement = 186,
|
||||
TryStatement = 187,
|
||||
DebuggerStatement = 188,
|
||||
VariableDeclaration = 189,
|
||||
VariableDeclarationList = 190,
|
||||
FunctionDeclaration = 191,
|
||||
ClassDeclaration = 192,
|
||||
InterfaceDeclaration = 193,
|
||||
TypeAliasDeclaration = 194,
|
||||
EnumDeclaration = 195,
|
||||
ModuleDeclaration = 196,
|
||||
ModuleBlock = 197,
|
||||
ImportDeclaration = 198,
|
||||
ExportAssignment = 199,
|
||||
ExternalModuleReference = 200,
|
||||
CaseClause = 201,
|
||||
DefaultClause = 202,
|
||||
HeritageClause = 203,
|
||||
CatchClause = 204,
|
||||
PropertyAssignment = 205,
|
||||
ShorthandPropertyAssignment = 206,
|
||||
EnumMember = 207,
|
||||
SourceFile = 208,
|
||||
SyntaxList = 209,
|
||||
Count = 210,
|
||||
OfKeyword = 122,
|
||||
QualifiedName = 123,
|
||||
ComputedPropertyName = 124,
|
||||
TypeParameter = 125,
|
||||
Parameter = 126,
|
||||
PropertySignature = 127,
|
||||
PropertyDeclaration = 128,
|
||||
MethodSignature = 129,
|
||||
MethodDeclaration = 130,
|
||||
Constructor = 131,
|
||||
GetAccessor = 132,
|
||||
SetAccessor = 133,
|
||||
CallSignature = 134,
|
||||
ConstructSignature = 135,
|
||||
IndexSignature = 136,
|
||||
TypeReference = 137,
|
||||
FunctionType = 138,
|
||||
ConstructorType = 139,
|
||||
TypeQuery = 140,
|
||||
TypeLiteral = 141,
|
||||
ArrayType = 142,
|
||||
TupleType = 143,
|
||||
UnionType = 144,
|
||||
ParenthesizedType = 145,
|
||||
ObjectBindingPattern = 146,
|
||||
ArrayBindingPattern = 147,
|
||||
BindingElement = 148,
|
||||
ArrayLiteralExpression = 149,
|
||||
ObjectLiteralExpression = 150,
|
||||
PropertyAccessExpression = 151,
|
||||
ElementAccessExpression = 152,
|
||||
CallExpression = 153,
|
||||
NewExpression = 154,
|
||||
TaggedTemplateExpression = 155,
|
||||
TypeAssertionExpression = 156,
|
||||
ParenthesizedExpression = 157,
|
||||
FunctionExpression = 158,
|
||||
ArrowFunction = 159,
|
||||
DeleteExpression = 160,
|
||||
TypeOfExpression = 161,
|
||||
VoidExpression = 162,
|
||||
PrefixUnaryExpression = 163,
|
||||
PostfixUnaryExpression = 164,
|
||||
BinaryExpression = 165,
|
||||
ConditionalExpression = 166,
|
||||
TemplateExpression = 167,
|
||||
YieldExpression = 168,
|
||||
SpreadElementExpression = 169,
|
||||
OmittedExpression = 170,
|
||||
TemplateSpan = 171,
|
||||
Block = 172,
|
||||
VariableStatement = 173,
|
||||
EmptyStatement = 174,
|
||||
ExpressionStatement = 175,
|
||||
IfStatement = 176,
|
||||
DoStatement = 177,
|
||||
WhileStatement = 178,
|
||||
ForStatement = 179,
|
||||
ForInStatement = 180,
|
||||
ForOfStatement = 181,
|
||||
ContinueStatement = 182,
|
||||
BreakStatement = 183,
|
||||
ReturnStatement = 184,
|
||||
WithStatement = 185,
|
||||
SwitchStatement = 186,
|
||||
LabeledStatement = 187,
|
||||
ThrowStatement = 188,
|
||||
TryStatement = 189,
|
||||
DebuggerStatement = 190,
|
||||
VariableDeclaration = 191,
|
||||
VariableDeclarationList = 192,
|
||||
FunctionDeclaration = 193,
|
||||
ClassDeclaration = 194,
|
||||
InterfaceDeclaration = 195,
|
||||
TypeAliasDeclaration = 196,
|
||||
EnumDeclaration = 197,
|
||||
ModuleDeclaration = 198,
|
||||
ModuleBlock = 199,
|
||||
ImportDeclaration = 200,
|
||||
ExportAssignment = 201,
|
||||
ExternalModuleReference = 202,
|
||||
CaseClause = 203,
|
||||
DefaultClause = 204,
|
||||
HeritageClause = 205,
|
||||
CatchClause = 206,
|
||||
PropertyAssignment = 207,
|
||||
ShorthandPropertyAssignment = 208,
|
||||
EnumMember = 209,
|
||||
SourceFile = 210,
|
||||
SyntaxList = 211,
|
||||
Count = 212,
|
||||
FirstAssignment = 52,
|
||||
LastAssignment = 63,
|
||||
FirstReservedWord = 65,
|
||||
LastReservedWord = 100,
|
||||
FirstKeyword = 65,
|
||||
LastKeyword = 121,
|
||||
LastKeyword = 122,
|
||||
FirstFutureReservedWord = 101,
|
||||
LastFutureReservedWord = 109,
|
||||
FirstTypeNode = 136,
|
||||
LastTypeNode = 144,
|
||||
FirstTypeNode = 137,
|
||||
LastTypeNode = 145,
|
||||
FirstPunctuation = 14,
|
||||
LastPunctuation = 63,
|
||||
FirstToken = 0,
|
||||
@ -324,7 +326,7 @@ declare module "typescript" {
|
||||
LastTemplateToken = 13,
|
||||
FirstBinaryOperator = 24,
|
||||
LastBinaryOperator = 63,
|
||||
FirstNode = 122,
|
||||
FirstNode = 123,
|
||||
}
|
||||
const enum NodeFlags {
|
||||
Export = 1,
|
||||
@ -655,6 +657,10 @@ declare module "typescript" {
|
||||
initializer: VariableDeclarationList | Expression;
|
||||
expression: Expression;
|
||||
}
|
||||
interface ForOfStatement extends IterationStatement {
|
||||
initializer: VariableDeclarationList | Expression;
|
||||
expression: Expression;
|
||||
}
|
||||
interface BreakOrContinueStatement extends Statement {
|
||||
label?: Identifier;
|
||||
}
|
||||
|
||||
@ -655,271 +655,277 @@ declare module "typescript" {
|
||||
TypeKeyword = 121,
|
||||
>TypeKeyword : SyntaxKind
|
||||
|
||||
QualifiedName = 122,
|
||||
OfKeyword = 122,
|
||||
>OfKeyword : SyntaxKind
|
||||
|
||||
QualifiedName = 123,
|
||||
>QualifiedName : SyntaxKind
|
||||
|
||||
ComputedPropertyName = 123,
|
||||
ComputedPropertyName = 124,
|
||||
>ComputedPropertyName : SyntaxKind
|
||||
|
||||
TypeParameter = 124,
|
||||
TypeParameter = 125,
|
||||
>TypeParameter : SyntaxKind
|
||||
|
||||
Parameter = 125,
|
||||
Parameter = 126,
|
||||
>Parameter : SyntaxKind
|
||||
|
||||
PropertySignature = 126,
|
||||
PropertySignature = 127,
|
||||
>PropertySignature : SyntaxKind
|
||||
|
||||
PropertyDeclaration = 127,
|
||||
PropertyDeclaration = 128,
|
||||
>PropertyDeclaration : SyntaxKind
|
||||
|
||||
MethodSignature = 128,
|
||||
MethodSignature = 129,
|
||||
>MethodSignature : SyntaxKind
|
||||
|
||||
MethodDeclaration = 129,
|
||||
MethodDeclaration = 130,
|
||||
>MethodDeclaration : SyntaxKind
|
||||
|
||||
Constructor = 130,
|
||||
Constructor = 131,
|
||||
>Constructor : SyntaxKind
|
||||
|
||||
GetAccessor = 131,
|
||||
GetAccessor = 132,
|
||||
>GetAccessor : SyntaxKind
|
||||
|
||||
SetAccessor = 132,
|
||||
SetAccessor = 133,
|
||||
>SetAccessor : SyntaxKind
|
||||
|
||||
CallSignature = 133,
|
||||
CallSignature = 134,
|
||||
>CallSignature : SyntaxKind
|
||||
|
||||
ConstructSignature = 134,
|
||||
ConstructSignature = 135,
|
||||
>ConstructSignature : SyntaxKind
|
||||
|
||||
IndexSignature = 135,
|
||||
IndexSignature = 136,
|
||||
>IndexSignature : SyntaxKind
|
||||
|
||||
TypeReference = 136,
|
||||
TypeReference = 137,
|
||||
>TypeReference : SyntaxKind
|
||||
|
||||
FunctionType = 137,
|
||||
FunctionType = 138,
|
||||
>FunctionType : SyntaxKind
|
||||
|
||||
ConstructorType = 138,
|
||||
ConstructorType = 139,
|
||||
>ConstructorType : SyntaxKind
|
||||
|
||||
TypeQuery = 139,
|
||||
TypeQuery = 140,
|
||||
>TypeQuery : SyntaxKind
|
||||
|
||||
TypeLiteral = 140,
|
||||
TypeLiteral = 141,
|
||||
>TypeLiteral : SyntaxKind
|
||||
|
||||
ArrayType = 141,
|
||||
ArrayType = 142,
|
||||
>ArrayType : SyntaxKind
|
||||
|
||||
TupleType = 142,
|
||||
TupleType = 143,
|
||||
>TupleType : SyntaxKind
|
||||
|
||||
UnionType = 143,
|
||||
UnionType = 144,
|
||||
>UnionType : SyntaxKind
|
||||
|
||||
ParenthesizedType = 144,
|
||||
ParenthesizedType = 145,
|
||||
>ParenthesizedType : SyntaxKind
|
||||
|
||||
ObjectBindingPattern = 145,
|
||||
ObjectBindingPattern = 146,
|
||||
>ObjectBindingPattern : SyntaxKind
|
||||
|
||||
ArrayBindingPattern = 146,
|
||||
ArrayBindingPattern = 147,
|
||||
>ArrayBindingPattern : SyntaxKind
|
||||
|
||||
BindingElement = 147,
|
||||
BindingElement = 148,
|
||||
>BindingElement : SyntaxKind
|
||||
|
||||
ArrayLiteralExpression = 148,
|
||||
ArrayLiteralExpression = 149,
|
||||
>ArrayLiteralExpression : SyntaxKind
|
||||
|
||||
ObjectLiteralExpression = 149,
|
||||
ObjectLiteralExpression = 150,
|
||||
>ObjectLiteralExpression : SyntaxKind
|
||||
|
||||
PropertyAccessExpression = 150,
|
||||
PropertyAccessExpression = 151,
|
||||
>PropertyAccessExpression : SyntaxKind
|
||||
|
||||
ElementAccessExpression = 151,
|
||||
ElementAccessExpression = 152,
|
||||
>ElementAccessExpression : SyntaxKind
|
||||
|
||||
CallExpression = 152,
|
||||
CallExpression = 153,
|
||||
>CallExpression : SyntaxKind
|
||||
|
||||
NewExpression = 153,
|
||||
NewExpression = 154,
|
||||
>NewExpression : SyntaxKind
|
||||
|
||||
TaggedTemplateExpression = 154,
|
||||
TaggedTemplateExpression = 155,
|
||||
>TaggedTemplateExpression : SyntaxKind
|
||||
|
||||
TypeAssertionExpression = 155,
|
||||
TypeAssertionExpression = 156,
|
||||
>TypeAssertionExpression : SyntaxKind
|
||||
|
||||
ParenthesizedExpression = 156,
|
||||
ParenthesizedExpression = 157,
|
||||
>ParenthesizedExpression : SyntaxKind
|
||||
|
||||
FunctionExpression = 157,
|
||||
FunctionExpression = 158,
|
||||
>FunctionExpression : SyntaxKind
|
||||
|
||||
ArrowFunction = 158,
|
||||
ArrowFunction = 159,
|
||||
>ArrowFunction : SyntaxKind
|
||||
|
||||
DeleteExpression = 159,
|
||||
DeleteExpression = 160,
|
||||
>DeleteExpression : SyntaxKind
|
||||
|
||||
TypeOfExpression = 160,
|
||||
TypeOfExpression = 161,
|
||||
>TypeOfExpression : SyntaxKind
|
||||
|
||||
VoidExpression = 161,
|
||||
VoidExpression = 162,
|
||||
>VoidExpression : SyntaxKind
|
||||
|
||||
PrefixUnaryExpression = 162,
|
||||
PrefixUnaryExpression = 163,
|
||||
>PrefixUnaryExpression : SyntaxKind
|
||||
|
||||
PostfixUnaryExpression = 163,
|
||||
PostfixUnaryExpression = 164,
|
||||
>PostfixUnaryExpression : SyntaxKind
|
||||
|
||||
BinaryExpression = 164,
|
||||
BinaryExpression = 165,
|
||||
>BinaryExpression : SyntaxKind
|
||||
|
||||
ConditionalExpression = 165,
|
||||
ConditionalExpression = 166,
|
||||
>ConditionalExpression : SyntaxKind
|
||||
|
||||
TemplateExpression = 166,
|
||||
TemplateExpression = 167,
|
||||
>TemplateExpression : SyntaxKind
|
||||
|
||||
YieldExpression = 167,
|
||||
YieldExpression = 168,
|
||||
>YieldExpression : SyntaxKind
|
||||
|
||||
SpreadElementExpression = 168,
|
||||
SpreadElementExpression = 169,
|
||||
>SpreadElementExpression : SyntaxKind
|
||||
|
||||
OmittedExpression = 169,
|
||||
OmittedExpression = 170,
|
||||
>OmittedExpression : SyntaxKind
|
||||
|
||||
TemplateSpan = 170,
|
||||
TemplateSpan = 171,
|
||||
>TemplateSpan : SyntaxKind
|
||||
|
||||
Block = 171,
|
||||
Block = 172,
|
||||
>Block : SyntaxKind
|
||||
|
||||
VariableStatement = 172,
|
||||
VariableStatement = 173,
|
||||
>VariableStatement : SyntaxKind
|
||||
|
||||
EmptyStatement = 173,
|
||||
EmptyStatement = 174,
|
||||
>EmptyStatement : SyntaxKind
|
||||
|
||||
ExpressionStatement = 174,
|
||||
ExpressionStatement = 175,
|
||||
>ExpressionStatement : SyntaxKind
|
||||
|
||||
IfStatement = 175,
|
||||
IfStatement = 176,
|
||||
>IfStatement : SyntaxKind
|
||||
|
||||
DoStatement = 176,
|
||||
DoStatement = 177,
|
||||
>DoStatement : SyntaxKind
|
||||
|
||||
WhileStatement = 177,
|
||||
WhileStatement = 178,
|
||||
>WhileStatement : SyntaxKind
|
||||
|
||||
ForStatement = 178,
|
||||
ForStatement = 179,
|
||||
>ForStatement : SyntaxKind
|
||||
|
||||
ForInStatement = 179,
|
||||
ForInStatement = 180,
|
||||
>ForInStatement : SyntaxKind
|
||||
|
||||
ContinueStatement = 180,
|
||||
ForOfStatement = 181,
|
||||
>ForOfStatement : SyntaxKind
|
||||
|
||||
ContinueStatement = 182,
|
||||
>ContinueStatement : SyntaxKind
|
||||
|
||||
BreakStatement = 181,
|
||||
BreakStatement = 183,
|
||||
>BreakStatement : SyntaxKind
|
||||
|
||||
ReturnStatement = 182,
|
||||
ReturnStatement = 184,
|
||||
>ReturnStatement : SyntaxKind
|
||||
|
||||
WithStatement = 183,
|
||||
WithStatement = 185,
|
||||
>WithStatement : SyntaxKind
|
||||
|
||||
SwitchStatement = 184,
|
||||
SwitchStatement = 186,
|
||||
>SwitchStatement : SyntaxKind
|
||||
|
||||
LabeledStatement = 185,
|
||||
LabeledStatement = 187,
|
||||
>LabeledStatement : SyntaxKind
|
||||
|
||||
ThrowStatement = 186,
|
||||
ThrowStatement = 188,
|
||||
>ThrowStatement : SyntaxKind
|
||||
|
||||
TryStatement = 187,
|
||||
TryStatement = 189,
|
||||
>TryStatement : SyntaxKind
|
||||
|
||||
DebuggerStatement = 188,
|
||||
DebuggerStatement = 190,
|
||||
>DebuggerStatement : SyntaxKind
|
||||
|
||||
VariableDeclaration = 189,
|
||||
VariableDeclaration = 191,
|
||||
>VariableDeclaration : SyntaxKind
|
||||
|
||||
VariableDeclarationList = 190,
|
||||
VariableDeclarationList = 192,
|
||||
>VariableDeclarationList : SyntaxKind
|
||||
|
||||
FunctionDeclaration = 191,
|
||||
FunctionDeclaration = 193,
|
||||
>FunctionDeclaration : SyntaxKind
|
||||
|
||||
ClassDeclaration = 192,
|
||||
ClassDeclaration = 194,
|
||||
>ClassDeclaration : SyntaxKind
|
||||
|
||||
InterfaceDeclaration = 193,
|
||||
InterfaceDeclaration = 195,
|
||||
>InterfaceDeclaration : SyntaxKind
|
||||
|
||||
TypeAliasDeclaration = 194,
|
||||
TypeAliasDeclaration = 196,
|
||||
>TypeAliasDeclaration : SyntaxKind
|
||||
|
||||
EnumDeclaration = 195,
|
||||
EnumDeclaration = 197,
|
||||
>EnumDeclaration : SyntaxKind
|
||||
|
||||
ModuleDeclaration = 196,
|
||||
ModuleDeclaration = 198,
|
||||
>ModuleDeclaration : SyntaxKind
|
||||
|
||||
ModuleBlock = 197,
|
||||
ModuleBlock = 199,
|
||||
>ModuleBlock : SyntaxKind
|
||||
|
||||
ImportDeclaration = 198,
|
||||
ImportDeclaration = 200,
|
||||
>ImportDeclaration : SyntaxKind
|
||||
|
||||
ExportAssignment = 199,
|
||||
ExportAssignment = 201,
|
||||
>ExportAssignment : SyntaxKind
|
||||
|
||||
ExternalModuleReference = 200,
|
||||
ExternalModuleReference = 202,
|
||||
>ExternalModuleReference : SyntaxKind
|
||||
|
||||
CaseClause = 201,
|
||||
CaseClause = 203,
|
||||
>CaseClause : SyntaxKind
|
||||
|
||||
DefaultClause = 202,
|
||||
DefaultClause = 204,
|
||||
>DefaultClause : SyntaxKind
|
||||
|
||||
HeritageClause = 203,
|
||||
HeritageClause = 205,
|
||||
>HeritageClause : SyntaxKind
|
||||
|
||||
CatchClause = 204,
|
||||
CatchClause = 206,
|
||||
>CatchClause : SyntaxKind
|
||||
|
||||
PropertyAssignment = 205,
|
||||
PropertyAssignment = 207,
|
||||
>PropertyAssignment : SyntaxKind
|
||||
|
||||
ShorthandPropertyAssignment = 206,
|
||||
ShorthandPropertyAssignment = 208,
|
||||
>ShorthandPropertyAssignment : SyntaxKind
|
||||
|
||||
EnumMember = 207,
|
||||
EnumMember = 209,
|
||||
>EnumMember : SyntaxKind
|
||||
|
||||
SourceFile = 208,
|
||||
SourceFile = 210,
|
||||
>SourceFile : SyntaxKind
|
||||
|
||||
SyntaxList = 209,
|
||||
SyntaxList = 211,
|
||||
>SyntaxList : SyntaxKind
|
||||
|
||||
Count = 210,
|
||||
Count = 212,
|
||||
>Count : SyntaxKind
|
||||
|
||||
FirstAssignment = 52,
|
||||
@ -937,7 +943,7 @@ declare module "typescript" {
|
||||
FirstKeyword = 65,
|
||||
>FirstKeyword : SyntaxKind
|
||||
|
||||
LastKeyword = 121,
|
||||
LastKeyword = 122,
|
||||
>LastKeyword : SyntaxKind
|
||||
|
||||
FirstFutureReservedWord = 101,
|
||||
@ -946,10 +952,10 @@ declare module "typescript" {
|
||||
LastFutureReservedWord = 109,
|
||||
>LastFutureReservedWord : SyntaxKind
|
||||
|
||||
FirstTypeNode = 136,
|
||||
FirstTypeNode = 137,
|
||||
>FirstTypeNode : SyntaxKind
|
||||
|
||||
LastTypeNode = 144,
|
||||
LastTypeNode = 145,
|
||||
>LastTypeNode : SyntaxKind
|
||||
|
||||
FirstPunctuation = 14,
|
||||
@ -988,7 +994,7 @@ declare module "typescript" {
|
||||
LastBinaryOperator = 63,
|
||||
>LastBinaryOperator : SyntaxKind
|
||||
|
||||
FirstNode = 122,
|
||||
FirstNode = 123,
|
||||
>FirstNode : SyntaxKind
|
||||
}
|
||||
const enum NodeFlags {
|
||||
@ -1969,6 +1975,19 @@ declare module "typescript" {
|
||||
|
||||
expression: Expression;
|
||||
>expression : Expression
|
||||
>Expression : Expression
|
||||
}
|
||||
interface ForOfStatement extends IterationStatement {
|
||||
>ForOfStatement : ForOfStatement
|
||||
>IterationStatement : IterationStatement
|
||||
|
||||
initializer: VariableDeclarationList | Expression;
|
||||
>initializer : Expression | VariableDeclarationList
|
||||
>VariableDeclarationList : VariableDeclarationList
|
||||
>Expression : Expression
|
||||
|
||||
expression: Expression;
|
||||
>expression : Expression
|
||||
>Expression : Expression
|
||||
}
|
||||
interface BreakOrContinueStatement extends Statement {
|
||||
|
||||
@ -250,105 +250,107 @@ declare module "typescript" {
|
||||
StringKeyword = 119,
|
||||
SymbolKeyword = 120,
|
||||
TypeKeyword = 121,
|
||||
QualifiedName = 122,
|
||||
ComputedPropertyName = 123,
|
||||
TypeParameter = 124,
|
||||
Parameter = 125,
|
||||
PropertySignature = 126,
|
||||
PropertyDeclaration = 127,
|
||||
MethodSignature = 128,
|
||||
MethodDeclaration = 129,
|
||||
Constructor = 130,
|
||||
GetAccessor = 131,
|
||||
SetAccessor = 132,
|
||||
CallSignature = 133,
|
||||
ConstructSignature = 134,
|
||||
IndexSignature = 135,
|
||||
TypeReference = 136,
|
||||
FunctionType = 137,
|
||||
ConstructorType = 138,
|
||||
TypeQuery = 139,
|
||||
TypeLiteral = 140,
|
||||
ArrayType = 141,
|
||||
TupleType = 142,
|
||||
UnionType = 143,
|
||||
ParenthesizedType = 144,
|
||||
ObjectBindingPattern = 145,
|
||||
ArrayBindingPattern = 146,
|
||||
BindingElement = 147,
|
||||
ArrayLiteralExpression = 148,
|
||||
ObjectLiteralExpression = 149,
|
||||
PropertyAccessExpression = 150,
|
||||
ElementAccessExpression = 151,
|
||||
CallExpression = 152,
|
||||
NewExpression = 153,
|
||||
TaggedTemplateExpression = 154,
|
||||
TypeAssertionExpression = 155,
|
||||
ParenthesizedExpression = 156,
|
||||
FunctionExpression = 157,
|
||||
ArrowFunction = 158,
|
||||
DeleteExpression = 159,
|
||||
TypeOfExpression = 160,
|
||||
VoidExpression = 161,
|
||||
PrefixUnaryExpression = 162,
|
||||
PostfixUnaryExpression = 163,
|
||||
BinaryExpression = 164,
|
||||
ConditionalExpression = 165,
|
||||
TemplateExpression = 166,
|
||||
YieldExpression = 167,
|
||||
SpreadElementExpression = 168,
|
||||
OmittedExpression = 169,
|
||||
TemplateSpan = 170,
|
||||
Block = 171,
|
||||
VariableStatement = 172,
|
||||
EmptyStatement = 173,
|
||||
ExpressionStatement = 174,
|
||||
IfStatement = 175,
|
||||
DoStatement = 176,
|
||||
WhileStatement = 177,
|
||||
ForStatement = 178,
|
||||
ForInStatement = 179,
|
||||
ContinueStatement = 180,
|
||||
BreakStatement = 181,
|
||||
ReturnStatement = 182,
|
||||
WithStatement = 183,
|
||||
SwitchStatement = 184,
|
||||
LabeledStatement = 185,
|
||||
ThrowStatement = 186,
|
||||
TryStatement = 187,
|
||||
DebuggerStatement = 188,
|
||||
VariableDeclaration = 189,
|
||||
VariableDeclarationList = 190,
|
||||
FunctionDeclaration = 191,
|
||||
ClassDeclaration = 192,
|
||||
InterfaceDeclaration = 193,
|
||||
TypeAliasDeclaration = 194,
|
||||
EnumDeclaration = 195,
|
||||
ModuleDeclaration = 196,
|
||||
ModuleBlock = 197,
|
||||
ImportDeclaration = 198,
|
||||
ExportAssignment = 199,
|
||||
ExternalModuleReference = 200,
|
||||
CaseClause = 201,
|
||||
DefaultClause = 202,
|
||||
HeritageClause = 203,
|
||||
CatchClause = 204,
|
||||
PropertyAssignment = 205,
|
||||
ShorthandPropertyAssignment = 206,
|
||||
EnumMember = 207,
|
||||
SourceFile = 208,
|
||||
SyntaxList = 209,
|
||||
Count = 210,
|
||||
OfKeyword = 122,
|
||||
QualifiedName = 123,
|
||||
ComputedPropertyName = 124,
|
||||
TypeParameter = 125,
|
||||
Parameter = 126,
|
||||
PropertySignature = 127,
|
||||
PropertyDeclaration = 128,
|
||||
MethodSignature = 129,
|
||||
MethodDeclaration = 130,
|
||||
Constructor = 131,
|
||||
GetAccessor = 132,
|
||||
SetAccessor = 133,
|
||||
CallSignature = 134,
|
||||
ConstructSignature = 135,
|
||||
IndexSignature = 136,
|
||||
TypeReference = 137,
|
||||
FunctionType = 138,
|
||||
ConstructorType = 139,
|
||||
TypeQuery = 140,
|
||||
TypeLiteral = 141,
|
||||
ArrayType = 142,
|
||||
TupleType = 143,
|
||||
UnionType = 144,
|
||||
ParenthesizedType = 145,
|
||||
ObjectBindingPattern = 146,
|
||||
ArrayBindingPattern = 147,
|
||||
BindingElement = 148,
|
||||
ArrayLiteralExpression = 149,
|
||||
ObjectLiteralExpression = 150,
|
||||
PropertyAccessExpression = 151,
|
||||
ElementAccessExpression = 152,
|
||||
CallExpression = 153,
|
||||
NewExpression = 154,
|
||||
TaggedTemplateExpression = 155,
|
||||
TypeAssertionExpression = 156,
|
||||
ParenthesizedExpression = 157,
|
||||
FunctionExpression = 158,
|
||||
ArrowFunction = 159,
|
||||
DeleteExpression = 160,
|
||||
TypeOfExpression = 161,
|
||||
VoidExpression = 162,
|
||||
PrefixUnaryExpression = 163,
|
||||
PostfixUnaryExpression = 164,
|
||||
BinaryExpression = 165,
|
||||
ConditionalExpression = 166,
|
||||
TemplateExpression = 167,
|
||||
YieldExpression = 168,
|
||||
SpreadElementExpression = 169,
|
||||
OmittedExpression = 170,
|
||||
TemplateSpan = 171,
|
||||
Block = 172,
|
||||
VariableStatement = 173,
|
||||
EmptyStatement = 174,
|
||||
ExpressionStatement = 175,
|
||||
IfStatement = 176,
|
||||
DoStatement = 177,
|
||||
WhileStatement = 178,
|
||||
ForStatement = 179,
|
||||
ForInStatement = 180,
|
||||
ForOfStatement = 181,
|
||||
ContinueStatement = 182,
|
||||
BreakStatement = 183,
|
||||
ReturnStatement = 184,
|
||||
WithStatement = 185,
|
||||
SwitchStatement = 186,
|
||||
LabeledStatement = 187,
|
||||
ThrowStatement = 188,
|
||||
TryStatement = 189,
|
||||
DebuggerStatement = 190,
|
||||
VariableDeclaration = 191,
|
||||
VariableDeclarationList = 192,
|
||||
FunctionDeclaration = 193,
|
||||
ClassDeclaration = 194,
|
||||
InterfaceDeclaration = 195,
|
||||
TypeAliasDeclaration = 196,
|
||||
EnumDeclaration = 197,
|
||||
ModuleDeclaration = 198,
|
||||
ModuleBlock = 199,
|
||||
ImportDeclaration = 200,
|
||||
ExportAssignment = 201,
|
||||
ExternalModuleReference = 202,
|
||||
CaseClause = 203,
|
||||
DefaultClause = 204,
|
||||
HeritageClause = 205,
|
||||
CatchClause = 206,
|
||||
PropertyAssignment = 207,
|
||||
ShorthandPropertyAssignment = 208,
|
||||
EnumMember = 209,
|
||||
SourceFile = 210,
|
||||
SyntaxList = 211,
|
||||
Count = 212,
|
||||
FirstAssignment = 52,
|
||||
LastAssignment = 63,
|
||||
FirstReservedWord = 65,
|
||||
LastReservedWord = 100,
|
||||
FirstKeyword = 65,
|
||||
LastKeyword = 121,
|
||||
LastKeyword = 122,
|
||||
FirstFutureReservedWord = 101,
|
||||
LastFutureReservedWord = 109,
|
||||
FirstTypeNode = 136,
|
||||
LastTypeNode = 144,
|
||||
FirstTypeNode = 137,
|
||||
LastTypeNode = 145,
|
||||
FirstPunctuation = 14,
|
||||
LastPunctuation = 63,
|
||||
FirstToken = 0,
|
||||
@ -361,7 +363,7 @@ declare module "typescript" {
|
||||
LastTemplateToken = 13,
|
||||
FirstBinaryOperator = 24,
|
||||
LastBinaryOperator = 63,
|
||||
FirstNode = 122,
|
||||
FirstNode = 123,
|
||||
}
|
||||
const enum NodeFlags {
|
||||
Export = 1,
|
||||
@ -692,6 +694,10 @@ declare module "typescript" {
|
||||
initializer: VariableDeclarationList | Expression;
|
||||
expression: Expression;
|
||||
}
|
||||
interface ForOfStatement extends IterationStatement {
|
||||
initializer: VariableDeclarationList | Expression;
|
||||
expression: Expression;
|
||||
}
|
||||
interface BreakOrContinueStatement extends Statement {
|
||||
label?: Identifier;
|
||||
}
|
||||
|
||||
@ -828,271 +828,277 @@ declare module "typescript" {
|
||||
TypeKeyword = 121,
|
||||
>TypeKeyword : SyntaxKind
|
||||
|
||||
QualifiedName = 122,
|
||||
OfKeyword = 122,
|
||||
>OfKeyword : SyntaxKind
|
||||
|
||||
QualifiedName = 123,
|
||||
>QualifiedName : SyntaxKind
|
||||
|
||||
ComputedPropertyName = 123,
|
||||
ComputedPropertyName = 124,
|
||||
>ComputedPropertyName : SyntaxKind
|
||||
|
||||
TypeParameter = 124,
|
||||
TypeParameter = 125,
|
||||
>TypeParameter : SyntaxKind
|
||||
|
||||
Parameter = 125,
|
||||
Parameter = 126,
|
||||
>Parameter : SyntaxKind
|
||||
|
||||
PropertySignature = 126,
|
||||
PropertySignature = 127,
|
||||
>PropertySignature : SyntaxKind
|
||||
|
||||
PropertyDeclaration = 127,
|
||||
PropertyDeclaration = 128,
|
||||
>PropertyDeclaration : SyntaxKind
|
||||
|
||||
MethodSignature = 128,
|
||||
MethodSignature = 129,
|
||||
>MethodSignature : SyntaxKind
|
||||
|
||||
MethodDeclaration = 129,
|
||||
MethodDeclaration = 130,
|
||||
>MethodDeclaration : SyntaxKind
|
||||
|
||||
Constructor = 130,
|
||||
Constructor = 131,
|
||||
>Constructor : SyntaxKind
|
||||
|
||||
GetAccessor = 131,
|
||||
GetAccessor = 132,
|
||||
>GetAccessor : SyntaxKind
|
||||
|
||||
SetAccessor = 132,
|
||||
SetAccessor = 133,
|
||||
>SetAccessor : SyntaxKind
|
||||
|
||||
CallSignature = 133,
|
||||
CallSignature = 134,
|
||||
>CallSignature : SyntaxKind
|
||||
|
||||
ConstructSignature = 134,
|
||||
ConstructSignature = 135,
|
||||
>ConstructSignature : SyntaxKind
|
||||
|
||||
IndexSignature = 135,
|
||||
IndexSignature = 136,
|
||||
>IndexSignature : SyntaxKind
|
||||
|
||||
TypeReference = 136,
|
||||
TypeReference = 137,
|
||||
>TypeReference : SyntaxKind
|
||||
|
||||
FunctionType = 137,
|
||||
FunctionType = 138,
|
||||
>FunctionType : SyntaxKind
|
||||
|
||||
ConstructorType = 138,
|
||||
ConstructorType = 139,
|
||||
>ConstructorType : SyntaxKind
|
||||
|
||||
TypeQuery = 139,
|
||||
TypeQuery = 140,
|
||||
>TypeQuery : SyntaxKind
|
||||
|
||||
TypeLiteral = 140,
|
||||
TypeLiteral = 141,
|
||||
>TypeLiteral : SyntaxKind
|
||||
|
||||
ArrayType = 141,
|
||||
ArrayType = 142,
|
||||
>ArrayType : SyntaxKind
|
||||
|
||||
TupleType = 142,
|
||||
TupleType = 143,
|
||||
>TupleType : SyntaxKind
|
||||
|
||||
UnionType = 143,
|
||||
UnionType = 144,
|
||||
>UnionType : SyntaxKind
|
||||
|
||||
ParenthesizedType = 144,
|
||||
ParenthesizedType = 145,
|
||||
>ParenthesizedType : SyntaxKind
|
||||
|
||||
ObjectBindingPattern = 145,
|
||||
ObjectBindingPattern = 146,
|
||||
>ObjectBindingPattern : SyntaxKind
|
||||
|
||||
ArrayBindingPattern = 146,
|
||||
ArrayBindingPattern = 147,
|
||||
>ArrayBindingPattern : SyntaxKind
|
||||
|
||||
BindingElement = 147,
|
||||
BindingElement = 148,
|
||||
>BindingElement : SyntaxKind
|
||||
|
||||
ArrayLiteralExpression = 148,
|
||||
ArrayLiteralExpression = 149,
|
||||
>ArrayLiteralExpression : SyntaxKind
|
||||
|
||||
ObjectLiteralExpression = 149,
|
||||
ObjectLiteralExpression = 150,
|
||||
>ObjectLiteralExpression : SyntaxKind
|
||||
|
||||
PropertyAccessExpression = 150,
|
||||
PropertyAccessExpression = 151,
|
||||
>PropertyAccessExpression : SyntaxKind
|
||||
|
||||
ElementAccessExpression = 151,
|
||||
ElementAccessExpression = 152,
|
||||
>ElementAccessExpression : SyntaxKind
|
||||
|
||||
CallExpression = 152,
|
||||
CallExpression = 153,
|
||||
>CallExpression : SyntaxKind
|
||||
|
||||
NewExpression = 153,
|
||||
NewExpression = 154,
|
||||
>NewExpression : SyntaxKind
|
||||
|
||||
TaggedTemplateExpression = 154,
|
||||
TaggedTemplateExpression = 155,
|
||||
>TaggedTemplateExpression : SyntaxKind
|
||||
|
||||
TypeAssertionExpression = 155,
|
||||
TypeAssertionExpression = 156,
|
||||
>TypeAssertionExpression : SyntaxKind
|
||||
|
||||
ParenthesizedExpression = 156,
|
||||
ParenthesizedExpression = 157,
|
||||
>ParenthesizedExpression : SyntaxKind
|
||||
|
||||
FunctionExpression = 157,
|
||||
FunctionExpression = 158,
|
||||
>FunctionExpression : SyntaxKind
|
||||
|
||||
ArrowFunction = 158,
|
||||
ArrowFunction = 159,
|
||||
>ArrowFunction : SyntaxKind
|
||||
|
||||
DeleteExpression = 159,
|
||||
DeleteExpression = 160,
|
||||
>DeleteExpression : SyntaxKind
|
||||
|
||||
TypeOfExpression = 160,
|
||||
TypeOfExpression = 161,
|
||||
>TypeOfExpression : SyntaxKind
|
||||
|
||||
VoidExpression = 161,
|
||||
VoidExpression = 162,
|
||||
>VoidExpression : SyntaxKind
|
||||
|
||||
PrefixUnaryExpression = 162,
|
||||
PrefixUnaryExpression = 163,
|
||||
>PrefixUnaryExpression : SyntaxKind
|
||||
|
||||
PostfixUnaryExpression = 163,
|
||||
PostfixUnaryExpression = 164,
|
||||
>PostfixUnaryExpression : SyntaxKind
|
||||
|
||||
BinaryExpression = 164,
|
||||
BinaryExpression = 165,
|
||||
>BinaryExpression : SyntaxKind
|
||||
|
||||
ConditionalExpression = 165,
|
||||
ConditionalExpression = 166,
|
||||
>ConditionalExpression : SyntaxKind
|
||||
|
||||
TemplateExpression = 166,
|
||||
TemplateExpression = 167,
|
||||
>TemplateExpression : SyntaxKind
|
||||
|
||||
YieldExpression = 167,
|
||||
YieldExpression = 168,
|
||||
>YieldExpression : SyntaxKind
|
||||
|
||||
SpreadElementExpression = 168,
|
||||
SpreadElementExpression = 169,
|
||||
>SpreadElementExpression : SyntaxKind
|
||||
|
||||
OmittedExpression = 169,
|
||||
OmittedExpression = 170,
|
||||
>OmittedExpression : SyntaxKind
|
||||
|
||||
TemplateSpan = 170,
|
||||
TemplateSpan = 171,
|
||||
>TemplateSpan : SyntaxKind
|
||||
|
||||
Block = 171,
|
||||
Block = 172,
|
||||
>Block : SyntaxKind
|
||||
|
||||
VariableStatement = 172,
|
||||
VariableStatement = 173,
|
||||
>VariableStatement : SyntaxKind
|
||||
|
||||
EmptyStatement = 173,
|
||||
EmptyStatement = 174,
|
||||
>EmptyStatement : SyntaxKind
|
||||
|
||||
ExpressionStatement = 174,
|
||||
ExpressionStatement = 175,
|
||||
>ExpressionStatement : SyntaxKind
|
||||
|
||||
IfStatement = 175,
|
||||
IfStatement = 176,
|
||||
>IfStatement : SyntaxKind
|
||||
|
||||
DoStatement = 176,
|
||||
DoStatement = 177,
|
||||
>DoStatement : SyntaxKind
|
||||
|
||||
WhileStatement = 177,
|
||||
WhileStatement = 178,
|
||||
>WhileStatement : SyntaxKind
|
||||
|
||||
ForStatement = 178,
|
||||
ForStatement = 179,
|
||||
>ForStatement : SyntaxKind
|
||||
|
||||
ForInStatement = 179,
|
||||
ForInStatement = 180,
|
||||
>ForInStatement : SyntaxKind
|
||||
|
||||
ContinueStatement = 180,
|
||||
ForOfStatement = 181,
|
||||
>ForOfStatement : SyntaxKind
|
||||
|
||||
ContinueStatement = 182,
|
||||
>ContinueStatement : SyntaxKind
|
||||
|
||||
BreakStatement = 181,
|
||||
BreakStatement = 183,
|
||||
>BreakStatement : SyntaxKind
|
||||
|
||||
ReturnStatement = 182,
|
||||
ReturnStatement = 184,
|
||||
>ReturnStatement : SyntaxKind
|
||||
|
||||
WithStatement = 183,
|
||||
WithStatement = 185,
|
||||
>WithStatement : SyntaxKind
|
||||
|
||||
SwitchStatement = 184,
|
||||
SwitchStatement = 186,
|
||||
>SwitchStatement : SyntaxKind
|
||||
|
||||
LabeledStatement = 185,
|
||||
LabeledStatement = 187,
|
||||
>LabeledStatement : SyntaxKind
|
||||
|
||||
ThrowStatement = 186,
|
||||
ThrowStatement = 188,
|
||||
>ThrowStatement : SyntaxKind
|
||||
|
||||
TryStatement = 187,
|
||||
TryStatement = 189,
|
||||
>TryStatement : SyntaxKind
|
||||
|
||||
DebuggerStatement = 188,
|
||||
DebuggerStatement = 190,
|
||||
>DebuggerStatement : SyntaxKind
|
||||
|
||||
VariableDeclaration = 189,
|
||||
VariableDeclaration = 191,
|
||||
>VariableDeclaration : SyntaxKind
|
||||
|
||||
VariableDeclarationList = 190,
|
||||
VariableDeclarationList = 192,
|
||||
>VariableDeclarationList : SyntaxKind
|
||||
|
||||
FunctionDeclaration = 191,
|
||||
FunctionDeclaration = 193,
|
||||
>FunctionDeclaration : SyntaxKind
|
||||
|
||||
ClassDeclaration = 192,
|
||||
ClassDeclaration = 194,
|
||||
>ClassDeclaration : SyntaxKind
|
||||
|
||||
InterfaceDeclaration = 193,
|
||||
InterfaceDeclaration = 195,
|
||||
>InterfaceDeclaration : SyntaxKind
|
||||
|
||||
TypeAliasDeclaration = 194,
|
||||
TypeAliasDeclaration = 196,
|
||||
>TypeAliasDeclaration : SyntaxKind
|
||||
|
||||
EnumDeclaration = 195,
|
||||
EnumDeclaration = 197,
|
||||
>EnumDeclaration : SyntaxKind
|
||||
|
||||
ModuleDeclaration = 196,
|
||||
ModuleDeclaration = 198,
|
||||
>ModuleDeclaration : SyntaxKind
|
||||
|
||||
ModuleBlock = 197,
|
||||
ModuleBlock = 199,
|
||||
>ModuleBlock : SyntaxKind
|
||||
|
||||
ImportDeclaration = 198,
|
||||
ImportDeclaration = 200,
|
||||
>ImportDeclaration : SyntaxKind
|
||||
|
||||
ExportAssignment = 199,
|
||||
ExportAssignment = 201,
|
||||
>ExportAssignment : SyntaxKind
|
||||
|
||||
ExternalModuleReference = 200,
|
||||
ExternalModuleReference = 202,
|
||||
>ExternalModuleReference : SyntaxKind
|
||||
|
||||
CaseClause = 201,
|
||||
CaseClause = 203,
|
||||
>CaseClause : SyntaxKind
|
||||
|
||||
DefaultClause = 202,
|
||||
DefaultClause = 204,
|
||||
>DefaultClause : SyntaxKind
|
||||
|
||||
HeritageClause = 203,
|
||||
HeritageClause = 205,
|
||||
>HeritageClause : SyntaxKind
|
||||
|
||||
CatchClause = 204,
|
||||
CatchClause = 206,
|
||||
>CatchClause : SyntaxKind
|
||||
|
||||
PropertyAssignment = 205,
|
||||
PropertyAssignment = 207,
|
||||
>PropertyAssignment : SyntaxKind
|
||||
|
||||
ShorthandPropertyAssignment = 206,
|
||||
ShorthandPropertyAssignment = 208,
|
||||
>ShorthandPropertyAssignment : SyntaxKind
|
||||
|
||||
EnumMember = 207,
|
||||
EnumMember = 209,
|
||||
>EnumMember : SyntaxKind
|
||||
|
||||
SourceFile = 208,
|
||||
SourceFile = 210,
|
||||
>SourceFile : SyntaxKind
|
||||
|
||||
SyntaxList = 209,
|
||||
SyntaxList = 211,
|
||||
>SyntaxList : SyntaxKind
|
||||
|
||||
Count = 210,
|
||||
Count = 212,
|
||||
>Count : SyntaxKind
|
||||
|
||||
FirstAssignment = 52,
|
||||
@ -1110,7 +1116,7 @@ declare module "typescript" {
|
||||
FirstKeyword = 65,
|
||||
>FirstKeyword : SyntaxKind
|
||||
|
||||
LastKeyword = 121,
|
||||
LastKeyword = 122,
|
||||
>LastKeyword : SyntaxKind
|
||||
|
||||
FirstFutureReservedWord = 101,
|
||||
@ -1119,10 +1125,10 @@ declare module "typescript" {
|
||||
LastFutureReservedWord = 109,
|
||||
>LastFutureReservedWord : SyntaxKind
|
||||
|
||||
FirstTypeNode = 136,
|
||||
FirstTypeNode = 137,
|
||||
>FirstTypeNode : SyntaxKind
|
||||
|
||||
LastTypeNode = 144,
|
||||
LastTypeNode = 145,
|
||||
>LastTypeNode : SyntaxKind
|
||||
|
||||
FirstPunctuation = 14,
|
||||
@ -1161,7 +1167,7 @@ declare module "typescript" {
|
||||
LastBinaryOperator = 63,
|
||||
>LastBinaryOperator : SyntaxKind
|
||||
|
||||
FirstNode = 122,
|
||||
FirstNode = 123,
|
||||
>FirstNode : SyntaxKind
|
||||
}
|
||||
const enum NodeFlags {
|
||||
@ -2142,6 +2148,19 @@ declare module "typescript" {
|
||||
|
||||
expression: Expression;
|
||||
>expression : Expression
|
||||
>Expression : Expression
|
||||
}
|
||||
interface ForOfStatement extends IterationStatement {
|
||||
>ForOfStatement : ForOfStatement
|
||||
>IterationStatement : IterationStatement
|
||||
|
||||
initializer: VariableDeclarationList | Expression;
|
||||
>initializer : Expression | VariableDeclarationList
|
||||
>VariableDeclarationList : VariableDeclarationList
|
||||
>Expression : Expression
|
||||
|
||||
expression: Expression;
|
||||
>expression : Expression
|
||||
>Expression : Expression
|
||||
}
|
||||
interface BreakOrContinueStatement extends Statement {
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement1.d.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement1.d.ts (1 errors) ====
|
||||
for (var i of e) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement10.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement10.ts (1 errors) ====
|
||||
for (const v of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserES5ForOfStatement10.js
Normal file
7
tests/baselines/reference/parserES5ForOfStatement10.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserES5ForOfStatement10.ts]
|
||||
for (const v of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement10.js]
|
||||
for (var v of X) {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement11.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement11.ts (1 errors) ====
|
||||
for (const [a, b] of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserES5ForOfStatement11.js
Normal file
7
tests/baselines/reference/parserES5ForOfStatement11.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserES5ForOfStatement11.ts]
|
||||
for (const [a, b] of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement11.js]
|
||||
for (var _a = void 0, a = _a[0], b = _a[1] of X) {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement12.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement12.ts (1 errors) ====
|
||||
for (const {a, b} of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserES5ForOfStatement12.js
Normal file
7
tests/baselines/reference/parserES5ForOfStatement12.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserES5ForOfStatement12.ts]
|
||||
for (const {a, b} of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement12.js]
|
||||
for (var _a = void 0, a = _a.a, b = _a.b of X) {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement13.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement13.ts (1 errors) ====
|
||||
for (let {a, b} of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserES5ForOfStatement13.js
Normal file
7
tests/baselines/reference/parserES5ForOfStatement13.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserES5ForOfStatement13.ts]
|
||||
for (let {a, b} of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement13.js]
|
||||
for (let _a = void 0, a = _a.a, b = _a.b of X) {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement14.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement14.ts (1 errors) ====
|
||||
for (let [a, b] of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserES5ForOfStatement14.js
Normal file
7
tests/baselines/reference/parserES5ForOfStatement14.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserES5ForOfStatement14.ts]
|
||||
for (let [a, b] of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement14.js]
|
||||
for (let _a = void 0, a = _a[0], b = _a[1] of X) {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement15.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement15.ts (1 errors) ====
|
||||
for (var [a, b] of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserES5ForOfStatement15.js
Normal file
7
tests/baselines/reference/parserES5ForOfStatement15.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserES5ForOfStatement15.ts]
|
||||
for (var [a, b] of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement15.js]
|
||||
for (var _a = void 0, a = _a[0], b = _a[1] of X) {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement16.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement16.ts (1 errors) ====
|
||||
for (var {a, b} of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserES5ForOfStatement16.js
Normal file
7
tests/baselines/reference/parserES5ForOfStatement16.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserES5ForOfStatement16.ts]
|
||||
for (var {a, b} of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement16.js]
|
||||
for (var _a = void 0, a = _a.a, b = _a.b of X) {
|
||||
}
|
||||
5
tests/baselines/reference/parserES5ForOfStatement17.js
Normal file
5
tests/baselines/reference/parserES5ForOfStatement17.js
Normal file
@ -0,0 +1,5 @@
|
||||
//// [parserES5ForOfStatement17.ts]
|
||||
for (var of; ;) { }
|
||||
|
||||
//// [parserES5ForOfStatement17.js]
|
||||
for (var of;;) { }
|
||||
@ -0,0 +1,4 @@
|
||||
=== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement17.ts ===
|
||||
for (var of; ;) { }
|
||||
>of : any
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement18.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement18.ts (1 errors) ====
|
||||
for (var of of of) { }
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
5
tests/baselines/reference/parserES5ForOfStatement18.js
Normal file
5
tests/baselines/reference/parserES5ForOfStatement18.js
Normal file
@ -0,0 +1,5 @@
|
||||
//// [parserES5ForOfStatement18.ts]
|
||||
for (var of of of) { }
|
||||
|
||||
//// [parserES5ForOfStatement18.js]
|
||||
for (var of of of) { }
|
||||
5
tests/baselines/reference/parserES5ForOfStatement19.js
Normal file
5
tests/baselines/reference/parserES5ForOfStatement19.js
Normal file
@ -0,0 +1,5 @@
|
||||
//// [parserES5ForOfStatement19.ts]
|
||||
for (var of in of) { }
|
||||
|
||||
//// [parserES5ForOfStatement19.js]
|
||||
for (var of in of) { }
|
||||
@ -0,0 +1,5 @@
|
||||
=== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement19.ts ===
|
||||
for (var of in of) { }
|
||||
>of : any
|
||||
>of : any
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement2.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement2.ts (1 errors) ====
|
||||
for (var of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserES5ForOfStatement2.js
Normal file
7
tests/baselines/reference/parserES5ForOfStatement2.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserES5ForOfStatement2.ts]
|
||||
for (var of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement2.js]
|
||||
for ( of X) {
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement20.ts(1,10): error TS1189: The variable declaration of a 'for...in' statement cannot have an initializer.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement20.ts (1 errors) ====
|
||||
for (var of = 0 in of) { }
|
||||
~~
|
||||
!!! error TS1189: The variable declaration of a 'for...in' statement cannot have an initializer.
|
||||
5
tests/baselines/reference/parserES5ForOfStatement20.js
Normal file
5
tests/baselines/reference/parserES5ForOfStatement20.js
Normal file
@ -0,0 +1,5 @@
|
||||
//// [parserES5ForOfStatement20.ts]
|
||||
for (var of = 0 in of) { }
|
||||
|
||||
//// [parserES5ForOfStatement20.js]
|
||||
for (var of = 0 in of) { }
|
||||
@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement21.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement21.ts (1 errors) ====
|
||||
for (var of of) { }
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
5
tests/baselines/reference/parserES5ForOfStatement21.js
Normal file
5
tests/baselines/reference/parserES5ForOfStatement21.js
Normal file
@ -0,0 +1,5 @@
|
||||
//// [parserES5ForOfStatement21.ts]
|
||||
for (var of of) { }
|
||||
|
||||
//// [parserES5ForOfStatement21.js]
|
||||
for ( of of) { }
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement3.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement3.ts (1 errors) ====
|
||||
for (var a, b of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserES5ForOfStatement3.js
Normal file
7
tests/baselines/reference/parserES5ForOfStatement3.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserES5ForOfStatement3.ts]
|
||||
for (var a, b of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement3.js]
|
||||
for (var a of X) {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement4.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement4.ts (1 errors) ====
|
||||
for (var a = 1 of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserES5ForOfStatement4.js
Normal file
7
tests/baselines/reference/parserES5ForOfStatement4.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserES5ForOfStatement4.ts]
|
||||
for (var a = 1 of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement4.js]
|
||||
for (var a = 1 of X) {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement5.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement5.ts (1 errors) ====
|
||||
for (var a: number of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserES5ForOfStatement5.js
Normal file
7
tests/baselines/reference/parserES5ForOfStatement5.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserES5ForOfStatement5.ts]
|
||||
for (var a: number of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement5.js]
|
||||
for (var a of X) {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement6.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement6.ts (1 errors) ====
|
||||
for (var a = 1, b = 2 of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserES5ForOfStatement6.js
Normal file
7
tests/baselines/reference/parserES5ForOfStatement6.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserES5ForOfStatement6.ts]
|
||||
for (var a = 1, b = 2 of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement6.js]
|
||||
for (var a = 1 of X) {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement7.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement7.ts (1 errors) ====
|
||||
for (var a: number = 1, b: string = "" of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserES5ForOfStatement7.js
Normal file
7
tests/baselines/reference/parserES5ForOfStatement7.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserES5ForOfStatement7.ts]
|
||||
for (var a: number = 1, b: string = "" of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement7.js]
|
||||
for (var a = 1 of X) {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement8.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement8.ts (1 errors) ====
|
||||
for (var v of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserES5ForOfStatement8.js
Normal file
7
tests/baselines/reference/parserES5ForOfStatement8.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserES5ForOfStatement8.ts]
|
||||
for (var v of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement8.js]
|
||||
for (var v of X) {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement9.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement9.ts (1 errors) ====
|
||||
for (let v of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserES5ForOfStatement9.js
Normal file
7
tests/baselines/reference/parserES5ForOfStatement9.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserES5ForOfStatement9.ts]
|
||||
for (let v of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement9.js]
|
||||
for (let v of X) {
|
||||
}
|
||||
@ -1,8 +1,11 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserForInStatement4.ts(1,10): error TS1189: The variable declaration of a 'for...in' statement cannot have an initializer.
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserForInStatement4.ts(1,19): error TS2304: Cannot find name 'X'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserForInStatement4.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserForInStatement4.ts (2 errors) ====
|
||||
for (var a = 1 in X) {
|
||||
~
|
||||
!!! error TS1189: The variable declaration of a 'for...in' statement cannot have an initializer.
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'X'.
|
||||
}
|
||||
@ -1,12 +1,9 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserForInStatement7.ts(1,10): error TS2404: The left-hand side of a 'for...in' statement cannot use a type annotation.
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserForInStatement7.ts(1,25): error TS1091: Only a single variable declaration is allowed in a 'for...in' statement.
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserForInStatement7.ts(1,43): error TS2304: Cannot find name 'X'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserForInStatement7.ts (3 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserForInStatement7.ts (2 errors) ====
|
||||
for (var a: number = 1, b: string = "" in X) {
|
||||
~
|
||||
!!! error TS2404: The left-hand side of a 'for...in' statement cannot use a type annotation.
|
||||
~
|
||||
!!! error TS1091: Only a single variable declaration is allowed in a 'for...in' statement.
|
||||
~
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement1.d.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement1.d.ts (1 errors) ====
|
||||
for (var i of e) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement10.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement10.ts (1 errors) ====
|
||||
for (const v of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserForOfStatement10.js
Normal file
7
tests/baselines/reference/parserForOfStatement10.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserForOfStatement10.ts]
|
||||
for (const v of X) {
|
||||
}
|
||||
|
||||
//// [parserForOfStatement10.js]
|
||||
for (var v of X) {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement11.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement11.ts (1 errors) ====
|
||||
for (const [a, b] of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserForOfStatement11.js
Normal file
7
tests/baselines/reference/parserForOfStatement11.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserForOfStatement11.ts]
|
||||
for (const [a, b] of X) {
|
||||
}
|
||||
|
||||
//// [parserForOfStatement11.js]
|
||||
for (var [a, b] of X) {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement12.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement12.ts (1 errors) ====
|
||||
for (const {a, b} of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserForOfStatement12.js
Normal file
7
tests/baselines/reference/parserForOfStatement12.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserForOfStatement12.ts]
|
||||
for (const {a, b} of X) {
|
||||
}
|
||||
|
||||
//// [parserForOfStatement12.js]
|
||||
for (var { a, b } of X) {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement13.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement13.ts (1 errors) ====
|
||||
for (let {a, b} of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserForOfStatement13.js
Normal file
7
tests/baselines/reference/parserForOfStatement13.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserForOfStatement13.ts]
|
||||
for (let {a, b} of X) {
|
||||
}
|
||||
|
||||
//// [parserForOfStatement13.js]
|
||||
for (let { a, b } of X) {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement14.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement14.ts (1 errors) ====
|
||||
for (let [a, b] of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserForOfStatement14.js
Normal file
7
tests/baselines/reference/parserForOfStatement14.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserForOfStatement14.ts]
|
||||
for (let [a, b] of X) {
|
||||
}
|
||||
|
||||
//// [parserForOfStatement14.js]
|
||||
for (let [a, b] of X) {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement15.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement15.ts (1 errors) ====
|
||||
for (var [a, b] of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserForOfStatement15.js
Normal file
7
tests/baselines/reference/parserForOfStatement15.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserForOfStatement15.ts]
|
||||
for (var [a, b] of X) {
|
||||
}
|
||||
|
||||
//// [parserForOfStatement15.js]
|
||||
for (var [a, b] of X) {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement16.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement16.ts (1 errors) ====
|
||||
for (var {a, b} of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserForOfStatement16.js
Normal file
7
tests/baselines/reference/parserForOfStatement16.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserForOfStatement16.ts]
|
||||
for (var {a, b} of X) {
|
||||
}
|
||||
|
||||
//// [parserForOfStatement16.js]
|
||||
for (var { a, b } of X) {
|
||||
}
|
||||
5
tests/baselines/reference/parserForOfStatement17.js
Normal file
5
tests/baselines/reference/parserForOfStatement17.js
Normal file
@ -0,0 +1,5 @@
|
||||
//// [parserForOfStatement17.ts]
|
||||
for (var of; ;) { }
|
||||
|
||||
//// [parserForOfStatement17.js]
|
||||
for (var of;;) { }
|
||||
4
tests/baselines/reference/parserForOfStatement17.types
Normal file
4
tests/baselines/reference/parserForOfStatement17.types
Normal file
@ -0,0 +1,4 @@
|
||||
=== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement17.ts ===
|
||||
for (var of; ;) { }
|
||||
>of : any
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement18.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement18.ts (1 errors) ====
|
||||
for (var of of of) { }
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
5
tests/baselines/reference/parserForOfStatement18.js
Normal file
5
tests/baselines/reference/parserForOfStatement18.js
Normal file
@ -0,0 +1,5 @@
|
||||
//// [parserForOfStatement18.ts]
|
||||
for (var of of of) { }
|
||||
|
||||
//// [parserForOfStatement18.js]
|
||||
for (var of of of) { }
|
||||
5
tests/baselines/reference/parserForOfStatement19.js
Normal file
5
tests/baselines/reference/parserForOfStatement19.js
Normal file
@ -0,0 +1,5 @@
|
||||
//// [parserForOfStatement19.ts]
|
||||
for (var of in of) { }
|
||||
|
||||
//// [parserForOfStatement19.js]
|
||||
for (var of in of) { }
|
||||
5
tests/baselines/reference/parserForOfStatement19.types
Normal file
5
tests/baselines/reference/parserForOfStatement19.types
Normal file
@ -0,0 +1,5 @@
|
||||
=== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement19.ts ===
|
||||
for (var of in of) { }
|
||||
>of : any
|
||||
>of : any
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement2.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement2.ts (1 errors) ====
|
||||
for (var of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserForOfStatement2.js
Normal file
7
tests/baselines/reference/parserForOfStatement2.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserForOfStatement2.ts]
|
||||
for (var of X) {
|
||||
}
|
||||
|
||||
//// [parserForOfStatement2.js]
|
||||
for ( of X) {
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement20.ts(1,10): error TS1189: The variable declaration of a 'for...in' statement cannot have an initializer.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement20.ts (1 errors) ====
|
||||
for (var of = 0 in of) { }
|
||||
~~
|
||||
!!! error TS1189: The variable declaration of a 'for...in' statement cannot have an initializer.
|
||||
5
tests/baselines/reference/parserForOfStatement20.js
Normal file
5
tests/baselines/reference/parserForOfStatement20.js
Normal file
@ -0,0 +1,5 @@
|
||||
//// [parserForOfStatement20.ts]
|
||||
for (var of = 0 in of) { }
|
||||
|
||||
//// [parserForOfStatement20.js]
|
||||
for (var of = 0 in of) { }
|
||||
@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement21.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement21.ts (1 errors) ====
|
||||
for (var of of) { }
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
5
tests/baselines/reference/parserForOfStatement21.js
Normal file
5
tests/baselines/reference/parserForOfStatement21.js
Normal file
@ -0,0 +1,5 @@
|
||||
//// [parserForOfStatement21.ts]
|
||||
for (var of of) { }
|
||||
|
||||
//// [parserForOfStatement21.js]
|
||||
for ( of of) { }
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement3.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement3.ts (1 errors) ====
|
||||
for (var a, b of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserForOfStatement3.js
Normal file
7
tests/baselines/reference/parserForOfStatement3.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserForOfStatement3.ts]
|
||||
for (var a, b of X) {
|
||||
}
|
||||
|
||||
//// [parserForOfStatement3.js]
|
||||
for (var a of X) {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement4.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement4.ts (1 errors) ====
|
||||
for (var a = 1 of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserForOfStatement4.js
Normal file
7
tests/baselines/reference/parserForOfStatement4.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserForOfStatement4.ts]
|
||||
for (var a = 1 of X) {
|
||||
}
|
||||
|
||||
//// [parserForOfStatement4.js]
|
||||
for (var a = 1 of X) {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement5.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement5.ts (1 errors) ====
|
||||
for (var a: number of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserForOfStatement5.js
Normal file
7
tests/baselines/reference/parserForOfStatement5.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserForOfStatement5.ts]
|
||||
for (var a: number of X) {
|
||||
}
|
||||
|
||||
//// [parserForOfStatement5.js]
|
||||
for (var a of X) {
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement6.ts(1,1): error TS9003: 'for...of' statements are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement6.ts (1 errors) ====
|
||||
for (var a = 1, b = 2 of X) {
|
||||
~~~
|
||||
!!! error TS9003: 'for...of' statements are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/parserForOfStatement6.js
Normal file
7
tests/baselines/reference/parserForOfStatement6.js
Normal file
@ -0,0 +1,7 @@
|
||||
//// [parserForOfStatement6.ts]
|
||||
for (var a = 1, b = 2 of X) {
|
||||
}
|
||||
|
||||
//// [parserForOfStatement6.js]
|
||||
for (var a = 1 of X) {
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user