[tsserver] api to find references to a file #39489
Labels
API
Relates to the public API for TypeScript
Committed
The team has roadmapped this issue
Domain: TSServer
Issues related to the TSServer
Fix Available
A PR has been opened for this issue
Suggestion
An idea for TypeScript
Milestone
Search Terms
Problem
If you run
find all references
on an import path, tsserver will return a list of locations where this file is imported:However it would also be useful to be able to run this command for a file without first having to find where it is imported. Some example use cases:
See microsoft/vscode#66150 for details on the VS Code side
Proposal
Add a new
FileReferences
request to the tsserver protocol. This command would take a file path (and optional project name) and return a list of references:Running this command should return a list of locations where the given file is imported (this matches what running
find all references on an import path does
)The text was updated successfully, but these errors were encountered: