Skip to content

Use another overload signature's documented info if exact one's info is missing #24414

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
falsandtru opened this issue May 25, 2018 · 3 comments
Labels
Help Wanted You can do this Suggestion An idea for TypeScript
Milestone

Comments

@falsandtru
Copy link
Contributor

TypeScript Version: 3.0.0-dev.20180522

Search Terms:

Code

/**
 * A
 */
function f(a: 0): void;
function f(a: number): void;
function f(a: number) {
}
f(1);

Expected behavior:

f(1) has documented info A.

Actual behavior:

f(1) has no documented info.

Playground Link:

Related Issues:

@mhegazy mhegazy added Suggestion An idea for TypeScript Help Wanted You can do this labels May 25, 2018
@mhegazy mhegazy added this to the Community milestone May 25, 2018
@mhegazy
Copy link
Contributor

mhegazy commented May 25, 2018

PRs welcomed.

@ajafff
Copy link
Contributor

ajafff commented May 25, 2018

This needs a little more thought than the opening post describes:
Does it only use the description or tags as well?
Should it only look at other signatures if the current signature has no jsdoc comment at all?
How should @param tags of other signatures be handled?
This may be kind of a braking change if it also uses @deprecated tag of another signature.

@RyanCavanaugh RyanCavanaugh modified the milestones: Community, Backlog Mar 7, 2019
@sandersn
Copy link
Member

Duplicate of #407

@sandersn sandersn marked this as a duplicate of #407 Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted You can do this Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

5 participants