import { BaseRange, BaseText } from 'slate'; import { ReactiveEditor } from './utils/reactive-editor'; declare module "slate" { interface CustomTypes { Editor: ReactiveEditor; Text: BaseText & { placeholder?: string; onPlaceholderResize?: (node: HTMLElement | null) => void; [key: string]: unknown; }; Range: BaseRange & { placeholder?: string; onPlaceholderResize?: (node: HTMLElement | null) => void; [key: string]: unknown; }; } } declare global { interface Window { MSStream: boolean; } interface DocumentOrShadowRoot { getSelection(): Selection | null; } interface CaretPosition { readonly offsetNode: Node; readonly offset: number; getClientRect(): DOMRect | null; } interface CaretPositionFromPointOptions { shadowRoots?: ShadowRoot[]; } interface Document { caretPositionFromPoint(x: number, y: number, options?: CaretPositionFromPointOptions): CaretPosition | null; } interface Node { getRootNode(options?: GetRootNodeOptions): Document | ShadowRoot; } } export {};