mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
Fix indentation for closing > of ExpressionWithTypeArguments (#42341)
This commit is contained in:
@@ -592,6 +592,7 @@ namespace ts.formatting {
|
||||
case SyntaxKind.JsxOpeningElement:
|
||||
case SyntaxKind.JsxClosingElement:
|
||||
case SyntaxKind.JsxSelfClosingElement:
|
||||
case SyntaxKind.ExpressionWithTypeArguments:
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -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;
|
||||
|
||||
9
tests/cases/fourslash/formatMultilineExtendsGeneric.ts
Normal file
9
tests/cases/fourslash/formatMultilineExtendsGeneric.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// class Favorite extends Array<
|
||||
//// string
|
||||
//// > {
|
||||
//// private foo = 2
|
||||
//// }
|
||||
|
||||
verify.formatDocumentChangesNothing();
|
||||
Reference in New Issue
Block a user