import type { Connection, ReplaceTextCommand } from './connection'; import type { DiagnosticSeverity, ServerOptions, ServerPosition } from './messages'; type FullTextContext = { readonly getText: () => string; readonly getCursorIndex: () => ServerPosition; }; type SlowUpdateResultDiagnostic = { readonly id: string; readonly severity: DiagnosticSeverity; readonly message: string; }; type SlowUpdateResult = { readonly diagnostics: ReadonlyArray; readonly extensionResult: TSlowUpdateExtensionData; }; export type SessionEventListeners = { readonly connectionChange: ((event: 'open' | 'loss') => void) | undefined; readonly slowUpdateWait: (() => void) | undefined; readonly slowUpdateResult: ((args: SlowUpdateResult) => void) | undefined; readonly serverError: ((message: string) => void) | undefined; }; export declare class Session { #private; constructor(connection: Connection, serverOptions: ServerOptions & TExtensionServerOptions, on: SessionEventListeners); setOptions(options: Partial & Partial): void; setFullText(context: FullTextContext): void; sendPartialText(command: ReplaceTextCommand): void; sendTypeChar(char: string): void; sendMoveCursor(cursorIndex: ServerPosition): void; destroy(): void; } export {};