import type { Language, DiagnosticSeverity } from './interfaces/protocol'; export declare type MirrorSharpLanguage = Language; export declare type MirrorSharpConnectionState = 'open' | 'error' | 'close'; export interface MirrorSharpDiagnostic { readonly id: string; readonly severity: DiagnosticSeverity; readonly message: string; } export interface MirrorSharpSlowUpdateResult { readonly diagnostics: ReadonlyArray; readonly x: TExtensionData; } export interface MirrorSharpOptions { readonly serviceUrl: string; readonly selfDebugEnabled?: boolean; readonly language?: MirrorSharpLanguage; readonly on?: { readonly slowUpdateWait?: () => void; readonly slowUpdateResult?: (args: MirrorSharpSlowUpdateResult) => void; readonly textChange?: (getText: () => string) => void; readonly connectionChange?: { (event: 'open', e: Event): void; (event: 'error', e: ErrorEvent): void; (event: 'close', e: CloseEvent): void; }; readonly serverError?: (message: string) => void; }; readonly noInitialConnection?: boolean; readonly initialServerOptions?: TExtensionServerOptions; readonly forCodeMirror?: CodeMirror.EditorConfiguration; } export interface MirrorSharpInstance { getCodeMirror(): CodeMirror.Editor; setText(text: string): void; getLanguage(): MirrorSharpLanguage; setLanguage(value: MirrorSharpLanguage): void; setServerOptions(value: TExtensionServerOptions): Promise; connect(): void; destroy(destroyOptions: { keepCodeMirror?: boolean; }): void; } export default function mirrorsharp(textarea: HTMLTextAreaElement, options: MirrorSharpOptions): MirrorSharpInstance;