@types/sharedb 3.3.9 → 3.3.11

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.
Files changed (3) hide show
  1. sharedb/README.md +2 -2
  2. sharedb/index.d.ts +28 -21
  3. sharedb/package.json +8 -3
sharedb/README.md CHANGED
@@ -8,8 +8,8 @@ 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: Wed, 17 Jan 2024 03:35:30 GMT
11
+ * Last updated: Tue, 02 Jul 2024 16:38:39 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
15
- These definitions were written by [Steve Oney](https://github.com/soney), [Eric Hwang](https://github.com/ericyhwang), [Peter Xu](https://github.com/pxpeterxu), [Alec Gibson](https://github.com/alecgibson), and [Christina Burger](https://github.com/pypmannetjies).
15
+ These definitions were written by [Steve Oney](https://github.com/soney), [Eric Hwang](https://github.com/ericyhwang), [Peter Xu](https://github.com/pxpeterxu), [Alec Gibson](https://github.com/alecgibson), [Christina Burger](https://github.com/pypmannetjies), and [Craig Beck](https://github.com/craigbeck).
sharedb/index.d.ts CHANGED
@@ -26,26 +26,7 @@ declare class sharedb extends EventEmitter {
26
26
  readonly [name: string]: ReadonlyProjection;
27
27
  };
28
28
 
29
- constructor(options?: {
30
- db?: any;
31
- pubsub?: sharedb.PubSub;
32
- extraDbs?: { [extraDbName: string]: sharedb.ExtraDB };
33
- milestoneDb?: sharedb.MilestoneDB;
34
- suppressPublish?: boolean;
35
- maxSubmitRetries?: number;
36
- doNotForwardSendPresenceErrorsToClient?: boolean;
37
- errorHandler?: ErrorHandler;
38
-
39
- presence?: boolean;
40
- /**
41
- * @deprecated disableDocAction was removed in v1.0
42
- */
43
- disableDocAction?: boolean;
44
- /**
45
- * @deprecated disableSpaceDelimitedActions was removed in v1.0
46
- */
47
- disableSpaceDelimitedActions?: boolean;
48
- });
29
+ constructor(options?: sharedb.ShareDBOptions);
49
30
  /**
50
31
  * Creates a server-side connection to ShareDB.
51
32
  *
@@ -120,6 +101,27 @@ declare class sharedb extends EventEmitter {
120
101
  }
121
102
 
122
103
  declare namespace sharedb {
104
+ interface ShareDBOptions {
105
+ db?: any;
106
+ pubsub?: sharedb.PubSub;
107
+ extraDbs?: { [extraDbName: string]: sharedb.ExtraDB };
108
+ milestoneDb?: sharedb.MilestoneDB;
109
+ suppressPublish?: boolean;
110
+ maxSubmitRetries?: number;
111
+ doNotForwardSendPresenceErrorsToClient?: boolean;
112
+ errorHandler?: ErrorHandler;
113
+
114
+ presence?: boolean;
115
+ /**
116
+ * @deprecated disableDocAction was removed in v1.0
117
+ */
118
+ disableDocAction?: boolean;
119
+ /**
120
+ * @deprecated disableSpaceDelimitedActions was removed in v1.0
121
+ */
122
+ disableSpaceDelimitedActions?: boolean;
123
+ }
124
+
123
125
  abstract class DB {
124
126
  projectsSnapshots: boolean;
125
127
  disableSubscribe: boolean;
@@ -219,7 +221,12 @@ declare namespace sharedb {
219
221
  private _removeStream(channel, stream): void;
220
222
  }
221
223
 
222
- abstract class MilestoneDB {
224
+ interface MilestoneDBEventMap {
225
+ "error": (error: Error) => void;
226
+ "save": (collection: string, snapshot: Snapshot) => void;
227
+ }
228
+
229
+ abstract class MilestoneDB extends ShareDB.TypedEmitter<MilestoneDBEventMap> {
223
230
  close(callback?: BasicCallback): void;
224
231
  getMilestoneSnapshot(collection: string, id: string, version: number, callback?: BasicCallback): void;
225
232
  saveMilestoneSnapshot(collection: string, snapshot: Snapshot, callback?: BasicCallback): void;
sharedb/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/sharedb",
3
- "version": "3.3.9",
3
+ "version": "3.3.11",
4
4
  "description": "TypeScript definitions for sharedb",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sharedb",
6
6
  "license": "MIT",
@@ -29,6 +29,11 @@
29
29
  "name": "Christina Burger",
30
30
  "githubUsername": "pypmannetjies",
31
31
  "url": "https://github.com/pypmannetjies"
32
+ },
33
+ {
34
+ "name": "Craig Beck",
35
+ "githubUsername": "craigbeck",
36
+ "url": "https://github.com/craigbeck"
32
37
  }
33
38
  ],
34
39
  "main": "",
@@ -40,6 +45,6 @@
40
45
  },
41
46
  "scripts": {},
42
47
  "dependencies": {},
43
- "typesPublisherContentHash": "442fbaedd2518019dc8eff1d79181cfe0e1757f0a3f1f477b6276051b9c80cae",
44
- "typeScriptVersion": "4.6"
48
+ "typesPublisherContentHash": "8f3b25ddc3f162745d0c748500548b97527227e1c1822c015bd9002b5a22bc2f",
49
+ "typeScriptVersion": "4.8"
45
50
  }