-
Notifications
You must be signed in to change notification settings - Fork 318
/
protocol.declaration.ts
52 lines (44 loc) · 2.42 KB
/
protocol.declaration.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* ------------------------------------------------------------------------------------------ */
'use strict';
import { RequestType, RequestHandler, ProgressType } from 'vscode-jsonrpc';
import { Declaration, DeclarationLink, Location, LocationLink } from 'vscode-languageserver-types';
import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
// @ts-ignore: to avoid inlining LocatioLink as dynamic import
let __noDynamicImport: LocationLink | Declaration | DeclarationLink | Location | undefined;
/**
* Since 3.14.0
*/
export interface DeclarationClientCapabilities {
/**
* Whether declaration supports dynamic registration. If this is set to `true`
* the client supports the new `DeclarationRegistrationOptions` return value
* for the corresponding server capability as well.
*/
dynamicRegistration?: boolean;
/**
* The client supports additional metadata in the form of declaration links.
*/
linkSupport?: boolean;
}
export interface DeclarationOptions extends WorkDoneProgressOptions {
}
export interface DeclarationRegistrationOptions extends DeclarationOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions {
}
export interface DeclarationParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
}
/**
* A request to resolve the type definition locations of a symbol at a given text
* document position. The request's parameter is of type [TextDocumentPositioParams]
* (#TextDocumentPositionParams) the response is of type [Declaration](#Declaration)
* or a typed array of [DeclarationLink](#DeclarationLink) or a Thenable that resolves
* to such.
*/
export namespace DeclarationRequest {
export const method: 'textDocument/declaration' = 'textDocument/declaration';
export const type = new RequestType<DeclarationParams, Declaration | DeclarationLink[] | null, void, DeclarationRegistrationOptions>(method);
export const resultType = new ProgressType<Location[] | DeclarationLink[]>();
export type HandlerSignature = RequestHandler<DeclarationParams, Declaration | DeclarationLink[] | null, void>;
}