mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-17 12:19:32 -05:00
fix wrong formatting with multiline type literals with IntersectionType and UnionType
This commit is contained in:
@@ -569,6 +569,12 @@ namespace ts.formatting {
|
||||
return childKind !== SyntaxKind.JsxClosingElement;
|
||||
case SyntaxKind.JsxFragment:
|
||||
return childKind !== SyntaxKind.JsxClosingFragment;
|
||||
case SyntaxKind.IntersectionType:
|
||||
case SyntaxKind.UnionType:
|
||||
if (childKind === SyntaxKind.TypeLiteral) {
|
||||
return false;
|
||||
}
|
||||
// falls through
|
||||
}
|
||||
// No explicit rule for given nodes so the result will follow the default value argument
|
||||
return indentByDefault;
|
||||
|
||||
Reference in New Issue
Block a user