mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-12 20:25:48 -06:00
Address PR
This commit is contained in:
parent
33524bd18c
commit
12549f69b0
@ -3491,9 +3491,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
export function parenthesizeConciseBody(body: ConciseBody): ConciseBody {
|
||||
const emittedBody = skipPartiallyEmittedExpressions(body);
|
||||
const leftMostExpression = isExpression(emittedBody) ? getLeftmostExpression(emittedBody) : undefined;
|
||||
if (leftMostExpression && leftMostExpression.kind === SyntaxKind.ObjectLiteralExpression) {
|
||||
if (!isBlock(body) && getLeftmostExpression(body).kind === SyntaxKind.ObjectLiteralExpression) {
|
||||
return setTextRange(createParen(<Expression>body), body);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user