Skip to content

QuickInfo Does not Return Documentation For Attribute #13963

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 Feb 9, 2017 · 2 comments
Closed

QuickInfo Does not Return Documentation For Attribute #13963

mjbvz opened this issue Feb 9, 2017 · 2 comments
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue VS Code Tracked There is a VS Code equivalent to this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Feb 9, 2017

From http://stackoverflow.com/questions/42126703/visual-studio-code-display-jsdoc-for-attribute

TypeScript Version: 2.2.0-dev.20170207

Code

interface Point {
    /** The x property */
    x: number;
    /** The y property */
    y: number;
}

const p: Point = <Point>{
    x: 10,
    y: 10,
};

p.x;

Expected behavior:
quickinfo for the x in x:10 shows the property info along with the documentation for x

Actual behavior:

Here's hovering over the x in x:10

[Trace - 5:45:18 PM] Sending request: quickinfo (507). Response expected: yes. Current queue length: 0
Arguments: {
    "file": "/Users/matb/projects/sand/castle.ts",
    "line": 9,
    "offset": 6
}
[Trace - 5:45:18 PM] Response received: quickinfo (507). Request took 2 ms. Success: true 
Result: {
    "kind": "property",
    "kindModifiers": "",
    "start": {
        "line": 9,
        "offset": 5
    },
    "end": {
        "line": 9,
        "offset": 6
    },
    "displayString": "(property) x: number",
    "documentation": ""
}

vs hovering over p.x:

[Trace - 5:46:10 PM] Sending request: quickinfo (509). Response expected: yes. Current queue length: 0
Arguments: {
    "file": "/Users/matb/projects/sand/castle.ts",
    "line": 13,
    "offset": 4
}
[Trace - 5:46:10 PM] Response received: quickinfo (509). Request took 1 ms. Success: true 
Result: {
    "kind": "property",
    "kindModifiers": "",
    "start": {
        "line": 13,
        "offset": 3
    },
    "end": {
        "line": 13,
        "offset": 4
    },
    "displayString": "(property) Point.x: number",
    "documentation": "The x property "
}

Note that completionEntryDetails for x in x:10 does return the documentation for Point.x

@mjbvz mjbvz added the VS Code Tracked There is a VS Code equivalent to this issue label Feb 9, 2017
@mhegazy mhegazy added the Bug A bug in TypeScript label Aug 29, 2017
@mhegazy mhegazy assigned ghost Aug 29, 2017
@ghost ghost closed this as completed in #18119 Sep 7, 2017
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Sep 7, 2017
@mhegazy mhegazy added this to the TypeScript 2.6 milestone Sep 7, 2017
@leandrocrs
Copy link

How to make it works properly with no-typescript projects like ES6+Babel projects?

@ghost
Copy link

ghost commented Jan 9, 2018

@leandrw #21105

@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue VS Code Tracked There is a VS Code equivalent to this issue
Projects
None yet
Development

No branches or pull requests

3 participants