-
Notifications
You must be signed in to change notification settings - Fork 352
/
index.d.ts
45 lines (35 loc) · 975 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/
import type { IComponent, IJodit, Nullable } from './src/types';
declare global {
const Jodit: IJodit;
interface HTMLElement {
component: Nullable<IComponent>;
}
interface CaretPosition {
offsetNode: Node;
offset: number;
}
interface IdleDeadline {
readonly didTimeout: boolean;
timeRemaining(): DOMHighResTimeStamp;
}
// https://github.com/xdan/jodit/issues/743
interface IdleRequestCallback {
(deadline: IdleDeadline): void;
}
interface Document {
caretPositionFromPoint?(x: number, y: number): CaretPosition;
}
// https://github.com/xdan/jodit/issues/718
interface ShadowRoot {
getSelection(): ReturnType<Window['getSelection']>;
}
interface Function {
originalConstructor: Function;
}
}
export { Jodit };