reactronic 0.22.101 → 0.22.102

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.
@@ -30,7 +30,7 @@ function nonreactive(func, ...args) {
30
30
  }
31
31
  exports.nonreactive = nonreactive;
32
32
  function nontransactional(func, ...args) {
33
- return Operation_1.OperationController.runWithin(undefined, Transaction_1.Transaction.nontransactional, func, ...args);
33
+ return Transaction_1.Transaction.off(func, ...args);
34
34
  }
35
35
  exports.nontransactional = nontransactional;
36
36
  function sensitive(sensitivity, func, ...args) {
@@ -418,7 +418,7 @@ class Operation extends Data_1.Observable {
418
418
  OperationController.runWithin(undefined, Transaction_1.Transaction.runAs, options, Monitor_1.MonitorImpl.enter, mon, this.transaction);
419
419
  }
420
420
  monitorLeave(mon) {
421
- Transaction_1.Transaction.nontransactional(() => {
421
+ Transaction_1.Transaction.off(() => {
422
422
  const leave = () => {
423
423
  const options = {
424
424
  hint: 'Monitor.leave',
@@ -23,7 +23,7 @@ export declare abstract class Transaction implements Worker {
23
23
  static create(options: SnapshotOptions | null): Transaction;
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
- static nontransactional<T>(func: F<T>, ...args: any[]): T;
26
+ static off<T>(func: F<T>, ...args: any[]): T;
27
27
  static isFrameOver(everyN?: number, timeLimit?: number): boolean;
28
28
  static requestNextFrame(sleepTime?: number): Promise<void>;
29
29
  static get isCanceled(): boolean;
@@ -21,7 +21,7 @@ class Transaction {
21
21
  static create(options) { return new TransactionImpl(options); }
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
- static nontransactional(func, ...args) { return TransactionImpl.nontransactional(func, ...args); }
24
+ static off(func, ...args) { return TransactionImpl.off(func, ...args); }
25
25
  static isFrameOver(everyN = 1, timeLimit = 14) { return TransactionImpl.isFrameOver(everyN, timeLimit); }
26
26
  static requestNextFrame(sleepTime = 0) { return TransactionImpl.requestNextFrame(sleepTime); }
27
27
  static get isCanceled() { return TransactionImpl.current.isCanceled; }
@@ -125,7 +125,7 @@ class TransactionImpl extends Transaction {
125
125
  let result = t.runImpl(options === null || options === void 0 ? void 0 : options.trace, func, ...args);
126
126
  if (root) {
127
127
  if (result instanceof Promise) {
128
- result = TransactionImpl.nontransactional(() => {
128
+ result = TransactionImpl.off(() => {
129
129
  return t.wrapToRetry(t.wrapToWaitUntilFinish(result), func, ...args);
130
130
  });
131
131
  }
@@ -133,7 +133,7 @@ class TransactionImpl extends Transaction {
133
133
  }
134
134
  return result;
135
135
  }
136
- static nontransactional(func, ...args) {
136
+ static off(func, ...args) {
137
137
  const outer = TransactionImpl.curr;
138
138
  try {
139
139
  TransactionImpl.curr = TransactionImpl.none;
@@ -230,7 +230,7 @@ class TransactionImpl extends Transaction {
230
230
  if (this.sealed && this.pending === 0) {
231
231
  const reactions = this.applyOrDiscard();
232
232
  TransactionImpl.curr = outer;
233
- TransactionImpl.nontransactional(Snapshot_1.Snapshot.enqueueReactionsToRun, reactions);
233
+ TransactionImpl.off(Snapshot_1.Snapshot.enqueueReactionsToRun, reactions);
234
234
  }
235
235
  else
236
236
  TransactionImpl.curr = outer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reactronic",
3
- "version": "0.22.101",
3
+ "version": "0.22.102",
4
4
  "description": "Reactronic - Transactional Reactive State Management",
5
5
  "main": "build/dist/source/api.js",
6
6
  "types": "build/dist/source/api.d.ts",