@cero-base/core 3.2.0 → 3.3.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.
package/package.json
CHANGED
package/src/database/rotation.js
CHANGED
|
@@ -71,6 +71,14 @@ export class Rotation {
|
|
|
71
71
|
return this._queued(() => this._carry(ops))
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
/**
|
|
75
|
+
* @returns {Promise<void>} Once every rotation asked of this device so far has ended: one asked
|
|
76
|
+
* after is sealed to the devices as they stand by then.
|
|
77
|
+
*/
|
|
78
|
+
async settled() {
|
|
79
|
+
await this._queue.catch(() => {})
|
|
80
|
+
}
|
|
81
|
+
|
|
74
82
|
/** @private */
|
|
75
83
|
_queued(fn) {
|
|
76
84
|
const run = this._queue.catch(() => {}).then(fn)
|
|
@@ -44,6 +44,11 @@ export declare class Rotation {
|
|
|
44
44
|
* @returns {Promise<number | undefined>} What the removal's write resolves.
|
|
45
45
|
*/
|
|
46
46
|
carry(ops: Array<[string, unknown]>): Promise<number | undefined>;
|
|
47
|
+
/**
|
|
48
|
+
* @returns {Promise<void>} Once every rotation asked of this device so far has ended: one asked
|
|
49
|
+
* after is sealed to the devices as they stand by then.
|
|
50
|
+
*/
|
|
51
|
+
settled(): Promise<void>;
|
|
47
52
|
/** @private */
|
|
48
53
|
private _queued;
|
|
49
54
|
/**
|