1 | import { BaseRange, BaseText } from 'slate';
|
2 | import { ReactEditor } from './plugin/react-editor';
|
3 | declare module 'slate' {
|
4 | interface CustomTypes {
|
5 | Editor: ReactEditor;
|
6 | Text: BaseText & {
|
7 | placeholder?: string;
|
8 | onPlaceholderResize?: (node: HTMLElement | null) => void;
|
9 | [key: string]: unknown;
|
10 | };
|
11 | Range: BaseRange & {
|
12 | placeholder?: string;
|
13 | onPlaceholderResize?: (node: HTMLElement | null) => void;
|
14 | [key: string]: unknown;
|
15 | };
|
16 | }
|
17 | }
|
18 | declare global {
|
19 | interface Window {
|
20 | MSStream: boolean;
|
21 | }
|
22 | interface DocumentOrShadowRoot {
|
23 | getSelection(): Selection | null;
|
24 | }
|
25 | interface CaretPosition {
|
26 | readonly offsetNode: Node;
|
27 | readonly offset: number;
|
28 | getClientRect(): DOMRect | null;
|
29 | }
|
30 | interface Document {
|
31 | caretPositionFromPoint(x: number, y: number): CaretPosition | null;
|
32 | }
|
33 | interface Node {
|
34 | getRootNode(options?: GetRootNodeOptions): Document | ShadowRoot;
|
35 | }
|
36 | }
|
37 | export {};
|
38 |
|
\ | No newline at end of file |