@types/sharedb 3.3.11 → 3.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sharedb/README.md +1 -1
- sharedb/lib/sharedb.d.ts +5 -1
- sharedb/package.json +2 -2
sharedb/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for sharedb (https://github.com/share/sha
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sharedb.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated: Tue,
|
|
11
|
+
* Last updated: Tue, 15 Oct 2024 16:40:27 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
|
|
14
14
|
# Credits
|
sharedb/lib/sharedb.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export interface Snapshot<T = any> {
|
|
|
21
21
|
data?: T;
|
|
22
22
|
m: SnapshotMeta | null;
|
|
23
23
|
}
|
|
24
|
+
export type IngestibleSnapshot<T = any> = Pick<Snapshot<T>, "v" | "type" | "data">;
|
|
24
25
|
|
|
25
26
|
export interface SnapshotMeta {
|
|
26
27
|
ctime: number;
|
|
@@ -119,11 +120,13 @@ export interface Type {
|
|
|
119
120
|
invert?(op: any): any;
|
|
120
121
|
normalize?(op: any): any;
|
|
121
122
|
transformCursor?(cursor: any, op: any, isOwnOp: boolean): any;
|
|
123
|
+
transformPresence?<T>(presence: T, op: any, isOwnOp: boolean): T;
|
|
122
124
|
serialize?(snapshot: any): any;
|
|
123
125
|
deserialize?(data: any): any;
|
|
124
126
|
[key: string]: any;
|
|
125
127
|
}
|
|
126
128
|
export interface Types {
|
|
129
|
+
defaultType: Type;
|
|
127
130
|
register: (type: Type) => void;
|
|
128
131
|
map: { [key: string]: Type };
|
|
129
132
|
}
|
|
@@ -172,7 +175,8 @@ export class Doc<T = any> extends TypedEmitter<DocEventMap<T>> {
|
|
|
172
175
|
subscribe: (callback?: (err: Error) => void) => void;
|
|
173
176
|
unsubscribe: (callback?: (err: Error) => void) => void;
|
|
174
177
|
|
|
175
|
-
|
|
178
|
+
toSnapshot(): IngestibleSnapshot<T>;
|
|
179
|
+
ingestSnapshot(snapshot: IngestibleSnapshot<T>, callback?: Callback): void;
|
|
176
180
|
destroy(callback?: Callback): void;
|
|
177
181
|
create(data: T, callback?: Callback): void;
|
|
178
182
|
create(data: T, type?: string, callback?: Callback): void;
|
sharedb/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/sharedb",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.13",
|
|
4
4
|
"description": "TypeScript definitions for sharedb",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sharedb",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
},
|
|
46
46
|
"scripts": {},
|
|
47
47
|
"dependencies": {},
|
|
48
|
-
"typesPublisherContentHash": "
|
|
48
|
+
"typesPublisherContentHash": "0a678cfa232f8d549ecf76cebed8c0a39464b47e2b1c48517f8eccb361d7c17c",
|
|
49
49
|
"typeScriptVersion": "4.8"
|
|
50
50
|
}
|