Skip to content

Quickinfo incorrectly reports "any" on typeof thisΒ #47063

@Zzzen

Description

@Zzzen

Bug Report

πŸ”Ž Search Terms

πŸ•— Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________

⏯ Playground Link

Playground link with relevant code

πŸ’» Code

export const foo = {
    num: 0,
    f(param: typeof this.num, f: typeof this) {
        const x = this;
        type X = typeof x;
        //              ^
        type Y = typeof this;
        //              ^^^^
    }
}

πŸ™ Actual behavior

move the cursor to this, it shows any
image

πŸ™‚ Expected behavior

like typeof x, it should show { number: number, f... }
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: Quick Infoe.g. hover text, tool-tips, and tooltips.Effort: CasualGood issue if you're already used to contributing to the codebase. Harder than "good first issue".Help WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions