Skip to content

Overload Doc Comment Issue #11910

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
aozgaa opened this issue Oct 27, 2016 · 2 comments
Closed

Overload Doc Comment Issue #11910

aozgaa opened this issue Oct 27, 2016 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@aozgaa
Copy link
Contributor

aozgaa commented Oct 27, 2016

TypeScript Version: master: commit adfdae0
Tested on Win10 in vscode 1.6.1 (commit 9e4e44c19)
It appears doc comments are shared between only some of the overloads in the following code snippet. this may be desirable -- perhaps each overload deserves a different description. But then the current behavior is strange as well.

Code

class A {}
class B { x: number }
class C { y: number }
class D { z: number }

/**
 * A doc comment.
 */
export function f(d: D): string; 
export function f(c: C): string; 
export function f(b: B): string;
export function f(a: A): string {
    return "";
}

Expected behavior:

On hover, all overloads get a doc comment description.

Actual behavior:

Only the overloads with argument of type D and A get the doc comment.

@kitsonk
Copy link
Contributor

kitsonk commented Oct 28, 2016

This has "annoyed" me that they can't be shared by default.

@mhegazy
Copy link
Contributor

mhegazy commented Oct 29, 2016

duplicate of #407

@mhegazy mhegazy added the Duplicate An existing issue was already created label Oct 29, 2016
@mhegazy mhegazy closed this as completed Oct 29, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants