import { EditorView, ViewUpdate } from '@codemirror/view'; import { Extension } from '@codemirror/state'; export type CodeMirrorOnChange = (view: ViewUpdate, nextValue: string | undefined, prevValue: string | undefined) => void; export type CodeMirrorOnExternalChange = (editor: EditorView, nextValue: string, prevValue: string) => void; export type CodeMirrorOnViewLifeCycle = (editor: EditorView | undefined, destroyed?: boolean) => void; export declare const useCodeMirror: (onChange?: CodeMirrorOnChange, value?: string, extensions?: Extension[], effects?: ((editor: EditorView) => void)[] | undefined, containerRef?: { current: HTMLDivElement | null; }, onExternalChange?: CodeMirrorOnExternalChange, onViewLifecycle?: CodeMirrorOnViewLifeCycle) => EditorView | undefined;