From 43064c63a9314d731b4e75f9e0ba0dba1ca5abea Mon Sep 17 00:00:00 2001 From: Maxime Mangel Date: Thu, 11 Jan 2024 16:31:22 +0100 Subject: [PATCH] Add an example for formatting long secondary constructor --- docs/fsharp/style-guide/formatting.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/fsharp/style-guide/formatting.md b/docs/fsharp/style-guide/formatting.md index cb47bb5ca5a07..310c282a30d6d 100644 --- a/docs/fsharp/style-guide/formatting.md +++ b/docs/fsharp/style-guide/formatting.md @@ -1651,6 +1651,16 @@ type TypeWithLongConstructor aThirdVeryLongCtorParam: AVeryLongTypeThatYouNeedToUse ) = // ... the body of the class follows + +// ✔️ OK +type TypeWithLongSecondaryConstructor () = + new + ( + aVeryLongCtorParam: AVeryLongTypeThatYouNeedToUse, + aSecondVeryLongCtorParam: AVeryLongTypeThatYouNeedToUse, + aThirdVeryLongCtorParam: AVeryLongTypeThatYouNeedToUse + ) = + // ... the body of the constructor follows ``` If the parameters are curried, place the `=` character along with any return type on a new line: