microsoft / microsoft/TypeScript

Autocomplete static methods and fields

Open
#57,331 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Awaiting More Feedback Suggestion
Dominant language
Go
Stars
111k
Forks
14.4k
Avg merge
1d 19h
Merged PRs (30d)
117

Description

Context

We should be able to autocomplete exported static variables, static functions, and enums

Reference

Intellij has this functionality, shown here:
image
Intellij blogpost about this feature: https://blog.jetbrains.com/idea/2012/08/complete-static-methods-and-fields-with-the-new-intellij-idea-12-eap-build-12229/

Example
// File 1
export class ExampleClass {
     static fooBar(): any {
          return {}
      }
}
// File 2
fooBa // typing this should suggest ExampleClass.fooBar 

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 two-file TypeScript example: define the exported static method in File 1 and type the partial name in File 2. Read the existing autocomplete and language-service entry points to determine where exported static variables, functions, and enums are collected. Done means the expected static members appear as suggestions in the second file.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.