Add support for Call Hierarchies in language server (#35176)

* Add support for Call Hierarchies in language server

* Use baselines for callHierarchy tests

* Clean up commented code

* Support multiple hierarchy items when an implementation can't be found

* Use optional chaining in a few places

* Use getFileAndProject
This commit is contained in:
Ron Buckton
2019-12-22 13:25:09 -08:00
committed by GitHub
parent 114dad7f56
commit 6c413e0bbb
55 changed files with 2712 additions and 55 deletions

View File

@@ -574,6 +574,15 @@ namespace Harness.LanguageService {
getEditsForFileRename(): readonly ts.FileTextChanges[] {
throw new Error("Not supported on the shim.");
}
prepareCallHierarchy(fileName: string, position: number) {
return unwrapJSONCallResult(this.shim.prepareCallHierarchy(fileName, position));
}
provideCallHierarchyIncomingCalls(fileName: string, position: number) {
return unwrapJSONCallResult(this.shim.provideCallHierarchyIncomingCalls(fileName, position));
}
provideCallHierarchyOutgoingCalls(fileName: string, position: number) {
return unwrapJSONCallResult(this.shim.provideCallHierarchyOutgoingCalls(fileName, position));
}
getEmitOutput(fileName: string): ts.EmitOutput {
return unwrapJSONCallResult(this.shim.getEmitOutput(fileName));
}