Skip to content

Overload Doc Comment Issue #11910

Closed
Closed
@aozgaa

Description

@aozgaa

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.

Activity

kitsonk

kitsonk commented on Oct 28, 2016

@kitsonk
Contributor

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

mhegazy

mhegazy commented on Oct 29, 2016

@mhegazy
Contributor

duplicate of #407

locked and limited conversation to collaborators on Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @kitsonk@aozgaa@mhegazy

        Issue actions

          Overload Doc Comment Issue · Issue #11910 · microsoft/TypeScript