mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-04-17 01:49:41 -05:00
Fix debug assert for type assertions / JSX (#52919)
This commit is contained in:
@@ -6167,7 +6167,7 @@ namespace Parser {
|
||||
}
|
||||
|
||||
function parseTypeAssertion(): TypeAssertion {
|
||||
Debug.assert(scriptKind === ScriptKind.TS, "Type assertions should never be parsed outside of TS; they should either be comparisons or JSX.");
|
||||
Debug.assert(languageVariant !== LanguageVariant.JSX, "Type assertions should never be parsed in JSX; they should be parsed as comparisons or JSX elements/fragments.");
|
||||
const pos = getNodePos();
|
||||
parseExpected(SyntaxKind.LessThanToken);
|
||||
const type = parseType();
|
||||
|
||||
Reference in New Issue
Block a user