diff --git a/src/services/formatting/smartIndenter.ts b/src/services/formatting/smartIndenter.ts index c7f762fea64..30da55b8f37 100644 --- a/src/services/formatting/smartIndenter.ts +++ b/src/services/formatting/smartIndenter.ts @@ -429,6 +429,7 @@ namespace ts.formatting { case SyntaxKind.ArrayBindingPattern: case SyntaxKind.ObjectBindingPattern: case SyntaxKind.JsxElement: + case SyntaxKind.FunctionType: return true; } return false; diff --git a/tests/cases/fourslash/formattingFunctionType.ts b/tests/cases/fourslash/formattingFunctionType.ts new file mode 100644 index 00000000000..0e63292b5ed --- /dev/null +++ b/tests/cases/fourslash/formattingFunctionType.ts @@ -0,0 +1,17 @@ +/// + +////function renderElement( +//// element: Element, +//// renderNode: ( +//// node: Node/*paramInFuntionType*/ +/////*paramIndent*/ +//// ) => void +////): void { +////} + +format.document(); + +goTo.marker("paramInFuntionType"); +verify.currentLineContentIs(" node: Node"); +goTo.marker("paramIndent"); +verify.indentationIs(8); \ No newline at end of file