-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Open
Description
π Search Terms
multi project goto definition
tsserver multiple projects
cross project goto
cross project references
β Viability Checklist
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
- This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals
β 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
Labels
No labels