1import { RequestHandler } from 'vscode-jsonrpc'; 2import { Declaration, DeclarationLink, Location, LocationLink } from 'vscode-languageserver-types'; 3import { ProtocolRequestType } from './messages'; 4import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; 5/** 6 * @since 3.14.0 7 */ 8export interface DeclarationClientCapabilities { 9 /** 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. 13 */ 14 dynamicRegistration?: boolean; 15 /** 16 * The client supports additional metadata in the form of declaration links. 17 */ 18 linkSupport?: boolean; 19} 20export interface DeclarationOptions extends WorkDoneProgressOptions { 21} 22export interface DeclarationRegistrationOptions extends DeclarationOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions { 23} 24export interface DeclarationParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { 25} 26/** 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 31 * to such. 32 */ 33export 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>; 37} 38