mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 19:08:15 +00:00
feat(lsp): implement textDocument/prepareCallHierarchy (#10061)
This commit is contained in:
parent
0552eaf569
commit
65a2a04d3b
9 changed files with 747 additions and 3 deletions
|
@ -726,6 +726,33 @@ delete Object.prototype.__proto__;
|
|||
ts.getSupportedCodeFixes(),
|
||||
);
|
||||
}
|
||||
case "prepareCallHierarchy": {
|
||||
return respond(
|
||||
id,
|
||||
languageService.prepareCallHierarchy(
|
||||
request.specifier,
|
||||
request.position,
|
||||
),
|
||||
);
|
||||
}
|
||||
case "provideCallHierarchyIncomingCalls": {
|
||||
return respond(
|
||||
id,
|
||||
languageService.provideCallHierarchyIncomingCalls(
|
||||
request.specifier,
|
||||
request.position,
|
||||
),
|
||||
);
|
||||
}
|
||||
case "provideCallHierarchyOutgoingCalls": {
|
||||
return respond(
|
||||
id,
|
||||
languageService.provideCallHierarchyOutgoingCalls(
|
||||
request.specifier,
|
||||
request.position,
|
||||
),
|
||||
);
|
||||
}
|
||||
default:
|
||||
throw new TypeError(
|
||||
// @ts-ignore exhausted case statement sets type to never
|
||||
|
|
25
cli/tsc/compiler.d.ts
vendored
25
cli/tsc/compiler.d.ts
vendored
|
@ -63,7 +63,10 @@ declare global {
|
|||
| GetReferencesRequest
|
||||
| GetSignatureHelpItemsRequest
|
||||
| GetSmartSelectionRange
|
||||
| GetSupportedCodeFixes;
|
||||
| GetSupportedCodeFixes
|
||||
| PrepareCallHierarchy
|
||||
| ProvideCallHierarchyIncomingCalls
|
||||
| ProvideCallHierarchyOutgoingCalls;
|
||||
|
||||
interface BaseLanguageServerRequest {
|
||||
id: number;
|
||||
|
@ -185,4 +188,24 @@ declare global {
|
|||
interface GetSupportedCodeFixes extends BaseLanguageServerRequest {
|
||||
method: "getSupportedCodeFixes";
|
||||
}
|
||||
|
||||
interface PrepareCallHierarchy extends BaseLanguageServerRequest {
|
||||
method: "prepareCallHierarchy";
|
||||
specifier: string;
|
||||
position: number;
|
||||
}
|
||||
|
||||
interface ProvideCallHierarchyIncomingCalls
|
||||
extends BaseLanguageServerRequest {
|
||||
method: "provideCallHierarchyIncomingCalls";
|
||||
specifier: string;
|
||||
position: number;
|
||||
}
|
||||
|
||||
interface ProvideCallHierarchyOutgoingCalls
|
||||
extends BaseLanguageServerRequest {
|
||||
method: "provideCallHierarchyOutgoingCalls";
|
||||
specifier: string;
|
||||
position: number;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue