forked from xdan/jodit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
52 lines (41 loc) · 1.14 KB
/
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
46
47
48
49
50
51
52
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/
import type { IComponent, Nullable } from './src/types';
import type { IJodit } from './src/types';
export * from './src/types';
declare global {
const Jodit: IJodit;
const isProd: boolean;
const isESNext: boolean;
const appVersion: string;
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;
caretRangeFromPoint(x: number, y: number): Range;
}
// https://github.com/xdan/jodit/issues/718
interface ShadowRoot {
getSelection(): ReturnType<Window['getSelection']>;
}
interface Function {
originalConstructor: Function;
}
}
export { Jodit };