Skip to content

Odd quickinfo result for jsdoc return tag using module #31298

Closed

Description

Fro microsoft/vscode#73363

TypeScript Version: 3.5.0-dev.20190507

Search Terms:

  • jsdoc
  • hover
  • quickinfo

Repo
For the js:

/**
 * @returns {module:@nodefuel/web~Webserver~wsServer} Websocket server object
 */
function foo() { }

Hover over foo

Bug:

The return tags text contains part of the type plus the closing }

[Trace  - 11:56:05 AM] Response received: quickinfo (38). Request took 2 ms. Success: true 
Result: {
    "kind": "function",
    "kindModifiers": "",
    "start": {
        "line": 4,
        "offset": 10
    },
    "end": {
        "line": 4,
        "offset": 13
    },
    "displayString": "function foo(): any",
    "documentation": "",
    "tags": [
        {
            "name": "returns",
            "text": ":"
        },
        {
            "name": "nodefuel",
            "text": "/web~Webserver~wsServer} Websocket server object"
        }
    ]
}

To be consistent with other jsdoc results, I believe we would expect a single @return tag with the text:

"text": "Websocket server object"

Playground Link:

Related Issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

APIRelates to the public API for TypeScriptBugA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions