import { Connection, TextDocumentIdentifier, Diagnostic, CancellationToken } from 'vscode-languageserver';
import { DocumentManager, Document } from './documents';
export type SendDiagnostics = Connection['sendDiagnostics'];
export type GetDiagnostics = (doc: TextDocumentIdentifier, cancellationToken?: CancellationToken) => Thenable<Diagnostic[]>;
export interface DiagnosticsManager {
    scheduleUpdate(document: Document): void;
    scheduleUpdateAll(): void;
    removeDiagnostics(document: Document): void;
    cancelStarted(uri: string): void;
}
export declare class PushDiagnosticsManager implements DiagnosticsManager {
    private sendDiagnostics;
    private docManager;
    private getDiagnostics;
    constructor(sendDiagnostics: SendDiagnostics, docManager: DocumentManager, getDiagnostics: GetDiagnostics);
    private pendingUpdates;
    private cancellationTokens;
    private updateAll;
    scheduleUpdateAll(): void;
    private debouncedUpdateAll;
    private update;
    cancelStarted(uri: string): void;
    removeDiagnostics(document: Document): void;
    scheduleUpdate(document: Document): void;
    private scheduleBatchUpdate;
}
export declare class PullDiagnosticsManager implements DiagnosticsManager {
    private sendDiagnostics;
    private sendRefreshDiagnostics;
    constructor(sendDiagnostics: SendDiagnostics, sendRefreshDiagnostics: () => void);
    private refreshTimeout;
    scheduleUpdate(): void;
    scheduleUpdateAll(): void;
    removeDiagnostics(document: Document): void;
    cancelStarted(): void;
}
