mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-07 05:41:22 -06:00
Fix indentation for closing > of ExpressionWithTypeArguments (#42341)
This commit is contained in:
parent
368cdfd29a
commit
33ea6c581a
@ -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();
|
||||
Loading…
x
Reference in New Issue
Block a user