1 import { RequestHandler } from 'vscode-jsonrpc';
2 import { Declaration, DeclarationLink, Location, LocationLink } from 'vscode-languageserver-types';
3 import { ProtocolRequestType } from './messages';
4 import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
8 export interface DeclarationClientCapabilities {
10 * Whether declaration supports dynamic registration. If this is set to `true`
11 * the client supports the new `DeclarationRegistrationOptions` return value
12 * for the corresponding server capability as well.
14 dynamicRegistration?: boolean;
16 * The client supports additional metadata in the form of declaration links.
18 linkSupport?: boolean;
20 export interface DeclarationOptions extends WorkDoneProgressOptions {
22 export interface DeclarationRegistrationOptions extends DeclarationOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions {
24 export interface DeclarationParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
27 * A request to resolve the type definition locations of a symbol at a given text
28 * document position. The request's parameter is of type [TextDocumentPositioParams]
29 * (#TextDocumentPositionParams) the response is of type [Declaration](#Declaration)
30 * or a typed array of [DeclarationLink](#DeclarationLink) or a Thenable that resolves
33 export declare namespace DeclarationRequest {
34 const method: 'textDocument/declaration';
35 const type: ProtocolRequestType<DeclarationParams, Location | Location[] | LocationLink[] | null, Location[] | LocationLink[], void, DeclarationRegistrationOptions>;
36 type HandlerSignature = RequestHandler<DeclarationParams, Declaration | DeclarationLink[] | null, void>;