Skip to content

Commit 33ea6c5

Browse files
authored
Fix indentation for closing > of ExpressionWithTypeArguments (#42341)
1 parent 368cdfd commit 33ea6c5

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

src/services/formatting/formatting.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,7 @@ namespace ts.formatting {
592592
case SyntaxKind.JsxOpeningElement:
593593
case SyntaxKind.JsxClosingElement:
594594
case SyntaxKind.JsxSelfClosingElement:
595+
case SyntaxKind.ExpressionWithTypeArguments:
595596
return false;
596597
}
597598
break;

src/services/formatting/smartIndenter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ namespace ts.formatting {
581581
if (childKind === SyntaxKind.TypeLiteral || childKind === SyntaxKind.TupleType) {
582582
return false;
583583
}
584-
// falls through
584+
break;
585585
}
586586
// No explicit rule for given nodes so the result will follow the default value argument
587587
return indentByDefault;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/// <reference path="fourslash.ts" />
2+
3+
//// class Favorite extends Array<
4+
//// string
5+
//// > {
6+
//// private foo = 2
7+
//// }
8+
9+
verify.formatDocumentChangesNothing();

0 commit comments

Comments
 (0)