X Tutup
The Wayback Machine - https://web.archive.org/web/20211022005443/https://github.com/microsoft/TypeScript/issues/45907
Skip to content
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

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

Open
HolgerJeromin opened this issue Sep 16, 2021 Β· 0 comments Β· May be fixed by #46274
Open

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

HolgerJeromin opened this issue Sep 16, 2021 Β· 0 comments Β· May be fixed by #46274

Comments

@HolgerJeromin
Copy link
Contributor

@HolgerJeromin HolgerJeromin commented Sep 16, 2021

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.

@sandersn sandersn changed the title Wrong intellisense when mixing class and instance properties with the same name Quick info uses JSDoc for inherited instance property with static property of same name Oct 6, 2021
@sandersn sandersn added this to the Backlog milestone Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
X Tutup