microsoft / microsoft/TypeScript

jsdoc mouse hover definition {Array.<static class>} bug

Open
#33,455 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Experience Enhancement Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

TypeScript Version: TS-next-3.7.0-2019.09.11


hi, if we add a definition jsdoc with static class array like this
/**@type {Array.<_A._B>} */
Mouse hover show any. And am not seem able to get link from vscode.
So i can't use ctrl+click to get definitions and travel in my codes.

I don't know if is a bug related to vscode engine or a mistake from my side?
Try this code and hover {Array.<_A._B>}

class _A {
    constructor() {
        /**@type {Array.<_A._B>} */
        this.test = null;
        //test intelisence
        this.test[0].TESTT
    };

    static _B = (function() {
        return class _B {
            constructor() {
                this.TESTT = true;
                
             };
        };
    })();

    static _C = class _C {
            constructor() {
                this.TESTT = true;
                
             };
        };

};

bug jsdoc

from suggest, it can also maybe related here.
https://github.com/microsoft/vscode/issues/17912

thanks in advance

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the JavaScript example with TypeScript-next-3.7.0-2019.09.11 and compare the hover and definition behavior with the linked VS Code issue. Done means the JSDoc type Array.<_A._B> is resolved in hover and Ctrl+click can navigate to its definition.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.