import 'codemirror/addon/search/searchcursor';
import 'codemirror/addon/search/matchesonscrollbar';
import 'codemirror/addon/search/jump-to-line';
import './code-editor-search.less';
import CodeMirror, { Editor, Position } from 'codemirror';
export declare class SearchState {
    posFrom: Position;
    posTo: Position;
    lastQuery: string | RegExp | null;
    query: string | RegExp;
    overlay: {
        token: (stream: any) => 'searching' | undefined;
    };
    queryText: string | RegExp;
    annotate: {
        clear: () => void;
    } | null;
}
/**
 * Following function is heavily based on original CodeMirror's search addon
 * with exception of `replace` functionality, standard dialog and code formatting.
 * https://github.com/codemirror/CodeMirror/blob/master/addon/search/search.js
 */
export declare function enableSearch(codeMirror: typeof CodeMirror): {
    doSearch: (cm: Editor, rev: boolean) => void;
    clearSearch: (cm: Editor) => void;
};
