mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Remove error disallowing for...of loops
This commit is contained in:
@@ -11246,8 +11246,6 @@ module ts {
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -471,6 +471,5 @@ 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." },
|
||||
};
|
||||
}
|
||||
@@ -1877,9 +1877,5 @@
|
||||
"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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user