Skip to content

Commit 548fc33

Browse files
authored
Merge pull request #39096 from MangelMaxime/fsharp_long_secondary_constructor_example
F# - Add an example for formatting long secondary constructor
2 parents 84e066b + 43064c6 commit 548fc33

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/fsharp/style-guide/formatting.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,6 +1651,16 @@ type TypeWithLongConstructor
16511651
aThirdVeryLongCtorParam: AVeryLongTypeThatYouNeedToUse
16521652
) =
16531653
// ... the body of the class follows
1654+
1655+
// ✔️ OK
1656+
type TypeWithLongSecondaryConstructor () =
1657+
new
1658+
(
1659+
aVeryLongCtorParam: AVeryLongTypeThatYouNeedToUse,
1660+
aSecondVeryLongCtorParam: AVeryLongTypeThatYouNeedToUse,
1661+
aThirdVeryLongCtorParam: AVeryLongTypeThatYouNeedToUse
1662+
) =
1663+
// ... the body of the constructor follows
16541664
```
16551665

16561666
If the parameters are curried, place the `=` character along with any return type on a new line:

0 commit comments

Comments
 (0)