Skip to content

No auto-complete for 'this.' or the class inside static blocks #47438

@orta

Description

@orta

Bug Report

class A  {
  static #field = 123

  static { 
    this.#field = 123 

    A.#field = 13
  }
}

Writing this. and A. does not give a list of static fields on A in the completions. Type checking works fine.

🔎 Search Terms

static blocks autocomplete completions

🕗 Version & Regression Information

N/A

⏯ Playground Link

Playground link with relevant code

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: LS: Completion ListsThe issue relates to showing completion lists in an editorEffort: 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