-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobal.d.ts
35 lines (33 loc) · 966 Bytes
/
global.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
type LocalPluginCore = {};
type RemotePluginCore = {
attributeAdd: (payload: {attribute: string; id: number; value: string}) => void
attributeChange: (payload: {attribute: string; id: number; value: string}) => void
attributeDelete: (payload: {attribute: string; id: number}) => void
elementDelete: (payload: {id: number}) => void
elementInsert: (
payload: {
id: number
nodeType: 'ElementNode'
tag: string
attributes: {
[key: string]: string
}
parentId: number
beforeId: number
} & {id: number; nodeType: 'TextNode'; text: string; parentId: number; beforeId: number} & {
id: number
nodeType: 'CommentNode'
parentId: number
beforeId: number
}
) => void
textReplace: (payload: {id: number; text: string}) => void
};
type LocalPluginError = {};
type RemotePluginError = {
error: (payload: {message: string}) => void
};
type LocalPluginHighlight = {};
type RemotePluginHighlight = {
highlight: (payload: {id: number}) => void
};