forked from codesandbox/codesandbox-client
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
25 lines (19 loc) · 769 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
declare module 'ot' {
export type SerializedTextOperation = (string | number)[];
class TextOperation {
delete(length: number): TextOperation;
insert(str: string): TextOperation;
retain(length: number): TextOperation;
baseLength: number;
targetLength: number;
apply(code: string): string;
compose(operation: TextOperation): TextOperation;
static transform(left: TextOperation, right: TextOperation): TextOperation;
static isRetain(operation: TextOperation): boolean;
static isInsert(operation: TextOperation): boolean;
static isDelete(operation: TextOperation): boolean;
static fromJSON(operation: SerializedTextOperation): TextOperation;
toJSON(): SerializedTextOperation;
}
export { TextOperation };
}