mol_jsx_lib 0.0.1082 → 0.0.1083

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/node.mjs CHANGED
@@ -1467,7 +1467,7 @@ var $;
1467
1467
  }
1468
1468
  return this.cache;
1469
1469
  }
1470
- async async() {
1470
+ async async_raw() {
1471
1471
  while (true) {
1472
1472
  this.fresh();
1473
1473
  if (this.cache instanceof Error) {
@@ -1483,6 +1483,12 @@ var $;
1483
1483
  }
1484
1484
  }
1485
1485
  }
1486
+ async() {
1487
+ const promise = this.async_raw();
1488
+ if (!promise.destructor)
1489
+ promise.destructor = () => this.destructor();
1490
+ return promise;
1491
+ }
1486
1492
  step() {
1487
1493
  return new Promise(done => {
1488
1494
  const sub = new $mol_wire_pub_sub;
package/node.test.js CHANGED
@@ -1458,7 +1458,7 @@ var $;
1458
1458
  }
1459
1459
  return this.cache;
1460
1460
  }
1461
- async async() {
1461
+ async async_raw() {
1462
1462
  while (true) {
1463
1463
  this.fresh();
1464
1464
  if (this.cache instanceof Error) {
@@ -1474,6 +1474,12 @@ var $;
1474
1474
  }
1475
1475
  }
1476
1476
  }
1477
+ async() {
1478
+ const promise = this.async_raw();
1479
+ if (!promise.destructor)
1480
+ promise.destructor = () => this.destructor();
1481
+ return promise;
1482
+ }
1477
1483
  step() {
1478
1484
  return new Promise(done => {
1479
1485
  const sub = new $mol_wire_pub_sub;