Allow line break before import attributes with keyword (#62593)

This commit is contained in:
Mateusz Burzyński
2025-10-14 09:51:33 -07:00
committed by GitHub
parent 0b6a241886
commit d3be7e171b
4 changed files with 77 additions and 1 deletions
+1 -1
View File
@@ -8435,7 +8435,7 @@ namespace Parser {
function tryParseImportAttributes() {
const currentToken = token();
if ((currentToken === SyntaxKind.WithKeyword || currentToken === SyntaxKind.AssertKeyword) && !scanner.hasPrecedingLineBreak()) {
if (currentToken === SyntaxKind.WithKeyword || (currentToken === SyntaxKind.AssertKeyword && !scanner.hasPrecedingLineBreak())) {
return parseImportAttributes(currentToken);
}
}