mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 10:29:18 -05:00
Resolve parsingContextErrors TODO (#50011)
* Add a test with broken code * Resolve TODO
This commit is contained in:
@@ -1497,6 +1497,10 @@
|
||||
"category": "Error",
|
||||
"code": 1477
|
||||
},
|
||||
"Identifier or string literal expected.": {
|
||||
"category": "Error",
|
||||
"code": 1478
|
||||
},
|
||||
|
||||
"The types of '{0}' are incompatible between these types.": {
|
||||
"category": "Error",
|
||||
|
||||
@@ -2780,7 +2780,9 @@ namespace ts {
|
||||
case ParsingContext.ImportOrExportSpecifiers: return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
||||
case ParsingContext.JsxAttributes: return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
||||
case ParsingContext.JsxChildren: return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
||||
default: return [undefined!]; // TODO: GH#18217 `default: Debug.assertNever(context);`
|
||||
case ParsingContext.AssertEntries: return parseErrorAtCurrentToken(Diagnostics.Identifier_or_string_literal_expected); // AssertionKey.
|
||||
case ParsingContext.Count: return Debug.fail("ParsingContext.Count used as a context"); // Not a real context, only a marker.
|
||||
default: Debug.assertNever(context);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user