UNPKG

1.94 kBTypeScriptView Raw
1import { RequestHandler } from 'vscode-jsonrpc';
2import { Definition, DefinitionLink, LocationLink, Location } from 'vscode-languageserver-types';
3import { MessageDirection, ProtocolRequestType } from './messages';
4import type { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
5/**
6 * Since 3.6.0
7 */
8export interface TypeDefinitionClientCapabilities {
9 /**
10 * Whether implementation supports dynamic registration. If this is set to `true`
11 * the client supports the new `TypeDefinitionRegistrationOptions` return value
12 * for the corresponding server capability as well.
13 */
14 dynamicRegistration?: boolean;
15 /**
16 * The client supports additional metadata in the form of definition links.
17 *
18 * Since 3.14.0
19 */
20 linkSupport?: boolean;
21}
22export interface TypeDefinitionOptions extends WorkDoneProgressOptions {
23}
24export interface TypeDefinitionRegistrationOptions extends TextDocumentRegistrationOptions, TypeDefinitionOptions, StaticRegistrationOptions {
25}
26export interface TypeDefinitionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
27}
28/**
29 * A request to resolve the type definition locations of a symbol at a given text
30 * document position. The request's parameter is of type {@link TextDocumentPositionParams}
31 * the response is of type {@link Definition} or a Thenable that resolves to such.
32 */
33export declare namespace TypeDefinitionRequest {
34 const method: 'textDocument/typeDefinition';
35 const messageDirection: MessageDirection;
36 const type: ProtocolRequestType<TypeDefinitionParams, Definition | LocationLink[] | null, Location[] | LocationLink[], void, TypeDefinitionRegistrationOptions>;
37 type HandlerSignature = RequestHandler<TypeDefinitionParams, Definition | DefinitionLink[] | null, void>;
38}