UNPKG

1.44 kBTypeScriptView Raw
1import { Disposable, DocumentDiagnosticParams, DocumentDiagnosticReport, DocumentDiagnosticReportPartialResult, DiagnosticServerCancellationData, WorkspaceDiagnosticParams, WorkspaceDiagnosticReport, WorkspaceDiagnosticReportPartialResult } from 'vscode-languageserver-protocol';
2import type { Feature, _Languages, ServerRequestHandler } from './server';
3/**
4 * Shape of the linked editing feature
5 *
6 * @since 3.16.0
7 */
8export interface DiagnosticFeatureShape {
9 diagnostics: {
10 /**
11 * Asks the client to refresh all diagnostics provided by this server by
12 * pull for the corresponding documents again.
13 */
14 refresh(): void;
15 /**
16 * Installs a handler for the document diagnostic request.
17 *
18 * @param handler The corresponding handler.
19 */
20 on(handler: ServerRequestHandler<DocumentDiagnosticParams, DocumentDiagnosticReport, DocumentDiagnosticReportPartialResult, DiagnosticServerCancellationData>): Disposable;
21 /**
22 * Installs a handler for the workspace diagnostic request.
23 *
24 * @param handler The corresponding handler.
25 */
26 onWorkspace(handler: ServerRequestHandler<WorkspaceDiagnosticParams, WorkspaceDiagnosticReport, WorkspaceDiagnosticReportPartialResult, DiagnosticServerCancellationData>): Disposable;
27 };
28}
29export declare const DiagnosticFeature: Feature<_Languages, DiagnosticFeatureShape>;