Introduced in 0.26.12
Discriminated union case field is unnamed.
Fields in discriminated union cases can be declared either named or unnamed.
Unnamed:
type Data =
| TwoParts of string * string
| OnePart of string
Named:
type Data =
| TwoParts of part1: string * part2: string
| OnePart of part1: string
The latter is preferable because it conveys the purpose of each field and helps differentiate between fields, especially if they are of the same type.
An exception is for DUs with single case with one field.
Example: Named:
type Foo =
| Foo of int
Add a field name to the discriminated union case field.
{
"favourNamedMembers": {
"enabled": false
}
}