Skip to content

Quick info uses JSDoc for inherited instance property with static property of same nameΒ #45907

@HolgerJeromin

Description

@HolgerJeromin

Bug Report

πŸ”Ž Search Terms

static class instance intellisense

πŸ•— Version & Regression Information

Tested TS 3.3 till nightly

  • This is the behavior in every version I tried, and I reviewed the FAQ

⏯ Playground Link and πŸ’» Code

class foo {
    constructor() { }
    /** instance bar */
    readonly bar = 'instance foo';
}
class foo2 extends foo {
    static readonly bar = 'class foo2';   // <- look at tooltip for 'bar' here
}

Workbench Repro

A bit larger example:

class foo{
    constructor() {
    }
    /** instance bar */
    readonly bar = 'instance foo';  //    <- tooltip here for 'bar' is correct
    /** class bar */
    static readonly bar: string = 'class foo'; //   <- tooltip here for 'bar' is correct
}
class foo2 extends foo{
    static readonly bar = 'class foo2'; // <- look at tooltip for 'bar' here
}

Workbench Repro

πŸ™ Actual behavior

Hover with the mouse over the static property of the inherited class. Is shows the jsdoc / tsdoc information from the instance property.

image

πŸ™‚ Expected behavior

In the first example the tooltip should show nothing. In the second example I should see class bar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: Quick Infoe.g. hover text, tool-tips, and tooltips.Good First IssueWell scoped, documented and has the green light

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions