export type GetCursorPosition = (x: number, y: number) => null | [node: Node, offset: number];
export declare const getCursorPosition: GetCursorPosition;
export declare const unit: (event: KeyboardEvent) => "" | "word" | "line";
/**
 * Save the current browser selection, so that it can be restored later. Returns
 * a callback to restore the selection.
 *
 * @returns Callback to restore the selection.
 */
export declare const saveSelection: () => (() => void) | undefined;
