mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Find references of a module by filename (#41805)
* Naive implementation enough to build and write a test * Add simple test * Add project references test * Add deduplication test, accept baselines * Add test for referencing a script (doesn’t do anything) * Update API baselines * Use refFileMap for non-module references * Fix find-all-refs on module specifier * Remove unused util * Don’t store text range on ts.RefFile * Ensure string literal could itself be a file reference * Remove unused utilities * Improve baseline format * Preserve old behavior of falling back to string literal references * Update baselines from master * Fix old RefFileMap code after merge * Add test for additional response info * Undo test change
This commit is contained in:
@@ -519,6 +519,9 @@ namespace Harness.LanguageService {
|
||||
findReferences(fileName: string, position: number): ts.ReferencedSymbol[] {
|
||||
return unwrapJSONCallResult(this.shim.findReferences(fileName, position));
|
||||
}
|
||||
getFileReferences(fileName: string): ts.ReferenceEntry[] {
|
||||
return unwrapJSONCallResult(this.shim.getFileReferences(fileName));
|
||||
}
|
||||
getOccurrencesAtPosition(fileName: string, position: number): ts.ReferenceEntry[] {
|
||||
return unwrapJSONCallResult(this.shim.getOccurrencesAtPosition(fileName, position));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user