mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-29 16:29:19 -05:00
Fix import assertion occurrences crash and make import assertion parsing more generous (#47535)
This commit is contained in:
@@ -7281,7 +7281,7 @@ namespace ts {
|
||||
const pos = getNodePos();
|
||||
const name = tokenIsIdentifierOrKeyword(token()) ? parseIdentifierName() : parseLiteralLikeNode(SyntaxKind.StringLiteral) as StringLiteral;
|
||||
parseExpected(SyntaxKind.ColonToken);
|
||||
const value = parseLiteralLikeNode(SyntaxKind.StringLiteral) as StringLiteral;
|
||||
const value = parseAssignmentExpressionOrHigher();
|
||||
return finishNode(factory.createAssertEntry(name, value), pos);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user