-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtypes.ts
34 lines (27 loc) · 881 Bytes
/
types.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
import { MapChange, StateChange } from '@jupyter/ydoc';
import * as Y from 'yjs';
import { ISignal } from '@lumino/signaling';
import { JSONObject } from '@lumino/coreutils';
import { IDisposable } from '@lumino/disposable';
export interface IJupyterYDocChange {
attrsChange?: MapChange;
stateChange?: StateChange<any>[];
}
export interface IJupyterYDoc extends IDisposable {
attrs: JSONObject;
getAttr(key: string): any;
setAttr(key: string, value: any): void;
removeAttr(key: string): void;
attrsChanged: ISignal<IJupyterYDoc, MapChange>;
ydoc: Y.Doc;
options: {[key: string]: any};
disposed: ISignal<any, void>;
}
export interface IJupyterYModel extends IDisposable {
yModelName: string;
isDisposed: boolean;
sharedModel: IJupyterYDoc;
roomId?: string;
sharedAttrsChanged: ISignal<IJupyterYDoc, MapChange>;
disposed: ISignal<any, void>;
}