interface CodeMirrorOptions { className?: string; foldGutter?: boolean; history?: any; indentWithTabs?: boolean; lineNumbers?: boolean; lineWrapping?: boolean; mode?: string; preventCopy?: boolean; readOnly?: boolean; tabSize?: number; theme?: 'default'; value?: string; } interface ICodeMirrorInstance { blur(): void; clearHistory(): void; destroy(): void; focus(): void; foldGutter?: boolean; foldLines(): number[]; foldLines(lines: number[]): void; formatAll(): void; getHistory(): any; getLine(line: number): string; getSelection(): string; getValue: () => string; historyRedoDepth(): number; historyUndoDepth(): number; lineCount(): number; on(event: 'change' | 'blur' | 'focus' | 'keyup' | 'fold' | 'unfold' | 'keydown' | 'rightOut' | 'leftOut', handler: (...args: any[]) => void): void; optionHelper: { theme: { reconfigure: (theme: any) => void; }; }; redoSelection(): void; replaceSelection(text: string): void; setOption(option: keyof CodeMirrorOptions, value: any): void; setSelection(anchor: number, header: number): void; setSelectionToEnd(): void; setSelectionToStart(): void; setValue(value: string): void; undoSelection(): void; view: { constructor: { theme: (options: any, settings: any) => any; }; dispatch: (params: { effects: any; }) => void; }; } interface ICodeMirror { fromTextArea: (textarea: HTMLTextAreaElement, options?: CodeMirrorOptions) => ICodeMirrorInstance; new (dom: HTMLElement, options?: CodeMirrorOptions): ICodeMirrorInstance; } declare function loadCodeMirror(cdnUrl?: string): Promise; export { CodeMirrorOptions, ICodeMirror, ICodeMirrorInstance, loadCodeMirror };