reactronic 0.21.525 → 0.21.526
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.
|
@@ -24,7 +24,7 @@ export declare abstract class Transaction implements Worker {
|
|
|
24
24
|
static run<T>(func: F<T>, ...args: any[]): T;
|
|
25
25
|
static runAs<T>(options: SnapshotOptions | null, func: F<T>, ...args: any[]): T;
|
|
26
26
|
static standalone<T>(func: F<T>, ...args: any[]): T;
|
|
27
|
-
static
|
|
28
|
-
static
|
|
27
|
+
static isFrameOver(everyN?: number): boolean;
|
|
28
|
+
static requestNextFrame(): Promise<void>;
|
|
29
29
|
static get isCanceled(): boolean;
|
|
30
30
|
}
|
|
@@ -22,8 +22,8 @@ class Transaction {
|
|
|
22
22
|
static run(func, ...args) { return TransactionImpl.run(func, ...args); }
|
|
23
23
|
static runAs(options, func, ...args) { return TransactionImpl.runAs(options, func, ...args); }
|
|
24
24
|
static standalone(func, ...args) { return TransactionImpl.standalone(func, ...args); }
|
|
25
|
-
static
|
|
26
|
-
static
|
|
25
|
+
static isFrameOver(everyN = 1) { return TransactionImpl.isFrameOver(everyN); }
|
|
26
|
+
static requestNextFrame() { return TransactionImpl.requestNextFrame(); }
|
|
27
27
|
static get isCanceled() { return TransactionImpl.current.isCanceled; }
|
|
28
28
|
}
|
|
29
29
|
exports.Transaction = Transaction;
|
|
@@ -143,7 +143,7 @@ class TransactionImpl extends Transaction {
|
|
|
143
143
|
TransactionImpl.curr = outer;
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
static
|
|
146
|
+
static isFrameOver(everyN = 1) {
|
|
147
147
|
TransactionImpl.checkCount++;
|
|
148
148
|
let result = TransactionImpl.checkCount % everyN === 0;
|
|
149
149
|
if (result) {
|
|
@@ -152,7 +152,7 @@ class TransactionImpl extends Transaction {
|
|
|
152
152
|
}
|
|
153
153
|
return result;
|
|
154
154
|
}
|
|
155
|
-
static
|
|
155
|
+
static requestNextFrame(sleepTime = 0) {
|
|
156
156
|
return (0, Utils_1.pause)(sleepTime);
|
|
157
157
|
}
|
|
158
158
|
static acquire(options) {
|