microsoft / microsoft/TypeScript

Way to Go From Method Implementation to Interface Method Declaration

Open
#14,588 4 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Awaiting More Feedback Domain: LS: Symbol Navigation Suggestion VS Code Tracked
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

From https://github.com/Microsoft/vscode/issues/22385

TypeScript Version: 2.2.1

Code

interface ITest {
    test(): void;
}

class Test implements ITest {
    test() {
        return null;
    }
}

Request
Running go to definition on test in class Test currently does not return ITest::test. Neither does go to type definition.

In VSCode, we would like some way to jump from a class's interface method implementation or abstract method implementation to the interface method declaration or abstract method declaration itself. I'm not sure which command makes sense to do this, either go to definition or go to type definition, but we are open to any suggestions

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 provided TypeScript example and inspect the language-service handling for “go to definition” and “go to type definition.” The change is complete when navigation from the class method reaches the corresponding interface or abstract method declaration, with behavior covered by the relevant language-service tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.