[Repo Assist] Add ApiDocParameter and ApiDocReturnInfo named record types#1066
Open
github-actions[bot] wants to merge 5 commits intomainfrom
Open
[Repo Assist] Add ApiDocParameter and ApiDocReturnInfo named record types#1066github-actions[bot] wants to merge 5 commits intomainfrom
github-actions[bot] wants to merge 5 commits intomainfrom
Conversation
…-assembly usability Replace anonymous records in ApiDocMember.Parameters and ApiDocMember.ReturnInfo with named record types ApiDocParameter and ApiDocReturnInfo. Anonymous records from different assemblies are not structurally compatible, making these properties difficult to consume externally. All field names are preserved, so existing code using .ParameterNameText, .ParameterType, .ParameterDocs, .ReturnType, .ReturnDocs continues to work without modification. Closes #735 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
11 tasks
dsyme
approved these changes
Mar 4, 2026
…pes-a077db202825ef23
Contributor
|
/repo-assist please update README |
…ocs.fsx Document the new named record types in the 'Building library documentation programmatically' section of docs/apidocs.fsx, showing how to access ApiDocMember.Parameters (ApiDocParameter list) and ApiDocMember.ReturnInfo (ApiDocReturnInfo) and how to pass them to user-defined functions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
Commit pushed:
|
Contributor
Author
|
🤖 This is an automated response from Repo Assist. I've updated the docs as requested. Added a new "Working with API member parameters and return information" subsection to The new section:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Closes #735
Root Cause
ApiDocMember.Parametersreturned alist<{| ParameterSymbol: ...; ParameterNameText: string; ParameterType: ApiDocHtml; ParameterDocs: ApiDocHtml option |}>andApiDocMember.ReturnInforeturned an anonymous record{| ReturnType: ...; ReturnDocs: ... |}. Anonymous records from different assemblies are not structurally compatible in F#, making it impossible for external consumers to pass these values to their own functions without pre-processing.Fix
Added two named record types:
ApiDocMember.Parametersnow returnsApiDocParameter listandApiDocMember.ReturnInforeturnsApiDocReturnInfo.Backwards Compatibility
All field names are identical to the anonymous record fields, so existing code using
.ParameterNameText,.ParameterType,.ParameterDocs,.ReturnType,.ReturnDocscontinues to work without modification. The change is additive from a usage perspective (named types are strictly more usable than anonymous records).Test Status