@types/sharedb 3.3.12 → 5.1.0

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 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, 30 Jul 2024 16:38:51 GMT
11
+ * Last updated: Wed, 23 Oct 2024 18:37:07 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
sharedb/index.d.ts CHANGED
@@ -109,6 +109,7 @@ declare namespace sharedb {
109
109
  suppressPublish?: boolean;
110
110
  maxSubmitRetries?: number;
111
111
  doNotForwardSendPresenceErrorsToClient?: boolean;
112
+ doNotCommitNoOps?: boolean;
112
113
  errorHandler?: ErrorHandler;
113
114
 
114
115
  presence?: boolean;
sharedb/lib/agent.d.ts CHANGED
@@ -35,6 +35,10 @@ declare class Agent<TCustom = any> {
35
35
  clientId: string;
36
36
  src: string;
37
37
  connectTime: number;
38
+ protocol: {
39
+ major: number;
40
+ minor: number;
41
+ };
38
42
 
39
43
  /**
40
44
  * Sends a JSON-compatible message to the client for this agent.
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;
@@ -174,7 +175,8 @@ export class Doc<T = any> extends TypedEmitter<DocEventMap<T>> {
174
175
  subscribe: (callback?: (err: Error) => void) => void;
175
176
  unsubscribe: (callback?: (err: Error) => void) => void;
176
177
 
177
- ingestSnapshot(snapshot: Pick<Snapshot<T>, "v" | "type" | "data">, callback?: Callback): void;
178
+ toSnapshot(): IngestibleSnapshot<T>;
179
+ ingestSnapshot(snapshot: IngestibleSnapshot<T>, callback?: Callback): void;
178
180
  destroy(callback?: Callback): void;
179
181
  create(data: T, callback?: Callback): void;
180
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.12",
3
+ "version": "5.1.0",
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,7 @@
45
45
  },
46
46
  "scripts": {},
47
47
  "dependencies": {},
48
- "typesPublisherContentHash": "146ef826470232d7d8af2ca4cb9ab8d4f841b3bd044b7ee69ad4a87fdb97ca78",
48
+ "peerDependencies": {},
49
+ "typesPublisherContentHash": "9d6b774cae8312a36cc3c101b82d2f2bde43ac17c0bd7d294d6ec98fb7fbfc0a",
49
50
  "typeScriptVersion": "4.8"
50
51
  }