Skip to content

Quick info returns wrong jsdoc tag for function overload #30181

Closed
@mjbvz

Description

@mjbvz

TypeScript Version: 3.4.0-dev.20190301

Search Terms:

  • quickInfo
  • jsdoc
  • tags

Code

declare function foo(): void;

/**
 * @deprecated
 */
declare function foo(x: number): void;

foo()
  1. Hover on foo on the last line

Expected behavior:
No deprecation tag shown since we are using the non deprecated

Actual behavior:
A deprecation tag is returned in the quickinfo response:

[Trace  - 5:08:21 PM] Response received: quickinfo (311). Request took 2 ms. Success: true 
Result: {
    "kind": "function",
    "kindModifiers": "declare",
    "start": {
        "line": 8,
        "offset": 1
    },
    "end": {
        "line": 8,
        "offset": 4
    },
    "displayString": "function foo(): void (+1 overload)",
    "documentation": "",
    "tags": [
        {
            "name": "deprecated"
        }
    ]
}

Playground Link:

Related Issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions