ts2fable merges documentation for member overloads resulting in too many parameters
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- fsharp, typescript
- Domain
- tooling
Research direction
Start by reproducing the reported output with the TypeScript overload snippet and trace how member overloads receive JSDoc and parameter metadata. The fix is complete when the generated F# documentation is attached appropriately to the overloads, includes only applicable parameters, and no longer produces warnings for this case.
Written by the indexing model from the issue text.
Description
given the following TS:
/**
* Register a signature help provider.
*
* Multiple providers can be registered for a language. In that case providers are sorted
* by their {@link languages.match score} and called sequentially until a provider returns a
* valid result.
*
* @param selector A selector that defines the documents this provider is applicable to.
* @param provider A signature help provider.
* @param triggerCharacters Trigger signature help when the user types one of the characters, like `,` or `(`.
* @param metadata Information about the provider.
* @return A {@link Disposable} that unregisters this provider when being disposed.
*/
export function registerSignatureHelpProvider(selector: DocumentSelector, provider: SignatureHelpProvider, ...triggerCharacters: string[]): Disposable;
export function registerSignatureHelpProvider(selector: DocumentSelector, provider: SignatureHelpProvider, metadata: SignatureHelpProviderMetadata): Disposable;
ts2fable 0.8.0-build.616 generates the following F#:
/// <summary>
/// Register a signature help provider.
///
/// Multiple providers can be registered for a language. In that case providers are sorted
/// by their <see cref="languages.match">score</see> and called sequentially until a provider returns a
/// valid result.
/// </summary>
/// <param name="selector">A selector that defines the documents this provider is applicable to.</param>
/// <param name="provider">A signature help provider.</param>
/// <param name="triggerCharacters">Trigger signature help when the user types one of the characters, like <c>,</c> or <c>(</c>.</param>
/// <param name="metadata">Information about the provider.</param>
/// <returns>A <see cref="Disposable" /> that unregisters this provider when being disposed.</returns>
abstract registerSignatureHelpProvider: selector: DocumentSelector * provider: SignatureHelpProvider * [<ParamArray>] triggerCharacters: string[] -> Disposable
abstract registerSignatureHelpProvider: selector: DocumentSelector * provider: SignatureHelpProvider * metadata: SignatureHelpProviderMetadata -> Disposable
the problem here is that the TS intended for the jsdoc to contain the superset of parameters for both overloads, but that superset has only been attached to the top overload in F#. it also has all parameters, which causes warnings.
- Dominant language
- F#
- Stars
- 232
- Forks
- 35
- Avg merge
- 11h 44m
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fable-compiler/ts2fable
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
fable-compiler/ts2fable#474 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
fable-compiler/ts2fable#444 · 3 comments ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
fable-compiler/ts2fable#439 · 3 comments · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
fable-compiler/ts2fable#437 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 38/100
fable-compiler/ts2fable#434 · 1 comment ·
All issues in fable-compiler/ts2fable
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
hemilabs/ui-monorepo#2332 ·
-
Help-Wanted Needs-Triage Package-Update
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/winget-pkgs#438662 ·
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
olcf/olcf-test-harness#278 · 1 comment ·