Skip to content

Odd quickinfo result for jsdoc return tag using module #31298

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
mjbvz opened this issue May 7, 2019 · 0 comments · Fixed by #32563
Closed

Odd quickinfo result for jsdoc return tag using module #31298

mjbvz opened this issue May 7, 2019 · 0 comments · Fixed by #32563
Assignees
Labels
API Relates to the public API for TypeScript Bug A bug in TypeScript Domain: JSDoc Relates to JSDoc parsing and type generation Fix Available A PR has been opened for this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented May 7, 2019

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:

@weswigham weswigham added API Relates to the public API for TypeScript Bug A bug in TypeScript Domain: JSDoc Relates to JSDoc parsing and type generation labels May 8, 2019
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 3.6.0 milestone Jun 12, 2019
@orta orta added the Fix Available A PR has been opened for this issue label Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Relates to the public API for TypeScript Bug A bug in TypeScript Domain: JSDoc Relates to JSDoc parsing and type generation Fix Available A PR has been opened for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants