Skip to content

[tsserver] Multi-project goto definition with accurate resultsΒ #62080

@erikolofsson

Description

@erikolofsson

πŸ” Search Terms

multi project goto definition
tsserver multiple projects
cross project goto
cross project references

βœ… Viability Checklist

⭐ Suggestion

Take all projects that references a file into consideration when doing goto definition.

πŸ“ƒ Motivating Example

Currently when you are working on shared code that calls or uses code that differs in implementation on the client and server the accuracy of goto definition is not optimal. It will just goto either the client or the server. It would be optimal if all relevant definitions were returned.

πŸ’» Use Cases

Example project:

// shared/shared.ts
let x: Thing; // < goto definition here

// project1/tsconfig.json
...

// project1/thingA.ts
interface Thing { a: string }

// project2/tsconfig.json
...

// project2/thingB.ts
interface Thing { b: number }

Currently this is returned (depending on order of project load):

interface Thing { a: string }

What ideally should be returned:

interface Thing { a: string }
interface Thing { b: number }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy