massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-json / node_modules / vscode-languageserver-protocol / lib / common / protocol.progress.d.ts
1 import { NotificationHandler, RequestHandler, ProgressType, ProgressToken } from 'vscode-jsonrpc';
2 import { uinteger } from 'vscode-languageserver-types';
3 import { ProtocolRequestType, ProtocolNotificationType } from './messages';
4 export interface WorkDoneProgressClientCapabilities {
5     /**
6      * Window specific client capabilities.
7      */
8     window?: {
9         /**
10          * Whether client supports server initiated progress using the
11          * `window/workDoneProgress/create` request.
12          *
13          * Since 3.15.0
14          */
15         workDoneProgress?: boolean;
16     };
17 }
18 export interface WorkDoneProgressBegin {
19     kind: 'begin';
20     /**
21      * Mandatory title of the progress operation. Used to briefly inform about
22      * the kind of operation being performed.
23      *
24      * Examples: "Indexing" or "Linking dependencies".
25      */
26     title: string;
27     /**
28      * Controls if a cancel button should show to allow the user to cancel the
29      * long running operation. Clients that don't support cancellation are allowed
30      * to ignore the setting.
31      */
32     cancellable?: boolean;
33     /**
34      * Optional, more detailed associated progress message. Contains
35      * complementary information to the `title`.
36      *
37      * Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
38      * If unset, the previous progress message (if any) is still valid.
39      */
40     message?: string;
41     /**
42      * Optional progress percentage to display (value 100 is considered 100%).
43      * If not provided infinite progress is assumed and clients are allowed
44      * to ignore the `percentage` value in subsequent in report notifications.
45      *
46      * The value should be steadily rising. Clients are free to ignore values
47      * that are not following this rule. The value range is [0, 100].
48      */
49     percentage?: uinteger;
50 }
51 export interface WorkDoneProgressReport {
52     kind: 'report';
53     /**
54      * Controls enablement state of a cancel button.
55      *
56      * Clients that don't support cancellation or don't support controlling the button's
57      * enablement state are allowed to ignore the property.
58      */
59     cancellable?: boolean;
60     /**
61      * Optional, more detailed associated progress message. Contains
62      * complementary information to the `title`.
63      *
64      * Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
65      * If unset, the previous progress message (if any) is still valid.
66      */
67     message?: string;
68     /**
69      * Optional progress percentage to display (value 100 is considered 100%).
70      * If not provided infinite progress is assumed and clients are allowed
71      * to ignore the `percentage` value in subsequent in report notifications.
72      *
73      * The value should be steadily rising. Clients are free to ignore values
74      * that are not following this rule. The value range is [0, 100]
75      */
76     percentage?: uinteger;
77 }
78 export interface WorkDoneProgressEnd {
79     kind: 'end';
80     /**
81      * Optional, a final message indicating to for example indicate the outcome
82      * of the operation.
83      */
84     message?: string;
85 }
86 export declare namespace WorkDoneProgress {
87     const type: ProgressType<WorkDoneProgressBegin | WorkDoneProgressReport | WorkDoneProgressEnd>;
88     function is(value: ProgressType<any>): value is typeof type;
89 }
90 export interface WorkDoneProgressCreateParams {
91     /**
92      * The token to be used to report progress.
93      */
94     token: ProgressToken;
95 }
96 /**
97  * The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress
98  * reporting from the server.
99  */
100 export declare namespace WorkDoneProgressCreateRequest {
101     const type: ProtocolRequestType<WorkDoneProgressCreateParams, void, never, void, void>;
102     type HandlerSignature = RequestHandler<WorkDoneProgressCreateParams, void, void>;
103 }
104 export interface WorkDoneProgressCancelParams {
105     /**
106      * The token to be used to report progress.
107      */
108     token: ProgressToken;
109 }
110 /**
111  * The `window/workDoneProgress/cancel` notification is sent from  the client to the server to cancel a progress
112  * initiated on the server side.
113  */
114 export declare namespace WorkDoneProgressCancelNotification {
115     const type: ProtocolNotificationType<WorkDoneProgressCancelParams, void>;
116     type HandlerSignature = NotificationHandler<WorkDoneProgressCancelParams>;
117 }