1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | Object.defineProperty(exports, "__esModule", { value: true });
|
7 | exports.DiagnosticFeature = void 0;
|
8 | const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol");
|
9 | const DiagnosticFeature = (Base) => {
|
10 | return class extends Base {
|
11 | get diagnostics() {
|
12 | return {
|
13 | refresh: () => {
|
14 | return this.connection.sendRequest(vscode_languageserver_protocol_1.DiagnosticRefreshRequest.type);
|
15 | },
|
16 | on: (handler) => {
|
17 | return this.connection.onRequest(vscode_languageserver_protocol_1.DocumentDiagnosticRequest.type, (params, cancel) => {
|
18 | return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(vscode_languageserver_protocol_1.DocumentDiagnosticRequest.partialResult, params));
|
19 | });
|
20 | },
|
21 | onWorkspace: (handler) => {
|
22 | return this.connection.onRequest(vscode_languageserver_protocol_1.WorkspaceDiagnosticRequest.type, (params, cancel) => {
|
23 | return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(vscode_languageserver_protocol_1.WorkspaceDiagnosticRequest.partialResult, params));
|
24 | });
|
25 | }
|
26 | };
|
27 | }
|
28 | };
|
29 | };
|
30 | exports.DiagnosticFeature = DiagnosticFeature;
|