summaryrefslogtreecommitdiff
path: root/cli/lsp/tsc.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/lsp/tsc.rs')
-rw-r--r--cli/lsp/tsc.rs16
1 files changed, 15 insertions, 1 deletions
diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs
index e56b7ab68..9647a79fc 100644
--- a/cli/lsp/tsc.rs
+++ b/cli/lsp/tsc.rs
@@ -2769,6 +2769,11 @@ pub enum RequestMethod {
GetSmartSelectionRange((ModuleSpecifier, u32)),
/// Get the diagnostic codes that support some form of code fix.
GetSupportedCodeFixes,
+ /// Get the type definition information for a specific position.
+ GetTypeDefinition {
+ specifier: ModuleSpecifier,
+ position: u32,
+ },
/// Resolve a call hierarchy item for a specific position.
PrepareCallHierarchy((ModuleSpecifier, u32)),
/// Resolve incoming call hierarchy items for a specific position.
@@ -2811,7 +2816,7 @@ impl RequestMethod {
"id": id,
"method": "getApplicableRefactors",
"specifier": state.denormalize_specifier(specifier),
- "range": { "pos": span.start, "end": span.start + span.length},
+ "range": { "pos": span.start, "end": span.start + span.length },
"kind": kind,
}),
RequestMethod::GetEditsForRefactor((
@@ -2950,6 +2955,15 @@ impl RequestMethod {
"id": id,
"method": "getSupportedCodeFixes",
}),
+ RequestMethod::GetTypeDefinition {
+ specifier,
+ position,
+ } => json!({
+ "id": id,
+ "method": "getTypeDefinition",
+ "specifier": state.denormalize_specifier(specifier),
+ "position": position
+ }),
RequestMethod::PrepareCallHierarchy((specifier, position)) => {
json!({
"id": id,