Open
Description
ApiDocMemberDetails
is currently described as a single case DUs.
FSharp.Formatting/src/FSharp.Formatting.ApiDocs/GenerateModel.fs
Lines 292 to 301 in 2efb355
This makes accessing the information in it not easy because tuples doesn't expose a named property to accessing the different values. The user is responsible, for manually naming each variables.
let (ApiDocMemberDetails(usageHtml,
paramTypes,
returnType,
modifiers,
typars,
baseType,
location,
compiledName)) =
entity.Details
I propose to change this type to a record which will exposed named properties making it easier for consumer to use the type.
type ApiDocMemberDetails =
{
UsageHtml: ApiDocHtml
ParamTypes: (Choice<FSharpParameter, FSharpField> * string * ApiDocHtml) list
ReturnType: (FSharpType * ApiDocHtml) option
Modifiers: string list
Typars: string list
ExtendedType: (FSharpEntity * ApiDocHtml) option
Location: string option
CompiledName: string option
}
// Usage
let details : ApiDocMemberDetails = // ...
details.ParamTypes
// etc.
Metadata
Metadata
Assignees
Labels
No labels