Fix indentation for closing > of ExpressionWithTypeArguments (#42341)

This commit is contained in:
Andrew Branch
2021-01-14 14:48:40 -08:00
committed by GitHub
parent 368cdfd29a
commit 33ea6c581a
3 changed files with 11 additions and 1 deletions

View File

@@ -592,6 +592,7 @@ namespace ts.formatting {
case SyntaxKind.JsxOpeningElement:
case SyntaxKind.JsxClosingElement:
case SyntaxKind.JsxSelfClosingElement:
case SyntaxKind.ExpressionWithTypeArguments:
return false;
}
break;

View File

@@ -581,7 +581,7 @@ namespace ts.formatting {
if (childKind === SyntaxKind.TypeLiteral || childKind === SyntaxKind.TupleType) {
return false;
}
// falls through
break;
}
// No explicit rule for given nodes so the result will follow the default value argument
return indentByDefault;

View File

@@ -0,0 +1,9 @@
/// <reference path="fourslash.ts" />
//// class Favorite extends Array<
//// string
//// > {
//// private foo = 2
//// }
verify.formatDocumentChangesNothing();