mol_jsx_lib 0.0.113 → 0.0.116
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.d.ts +4 -0
- package/node.deps.json +1 -1
- package/node.esm.js +24 -0
- package/node.esm.js.map +1 -1
- package/node.js +24 -0
- package/node.js.map +1 -1
- package/node.test.js +24 -0
- package/node.test.js.map +1 -1
- package/package.json +2 -1
- package/web.d.ts +4 -0
- package/web.deps.json +1 -1
- package/web.esm.js +24 -0
- package/web.esm.js.map +1 -1
- package/web.js +24 -0
- package/web.js.map +1 -1
package/web.js
CHANGED
|
@@ -1636,6 +1636,30 @@ var $;
|
|
|
1636
1636
|
;
|
|
1637
1637
|
"use strict";
|
|
1638
1638
|
var $;
|
|
1639
|
+
(function ($) {
|
|
1640
|
+
function $mol_wire_race(...tasks) {
|
|
1641
|
+
const results = tasks.map(task => {
|
|
1642
|
+
try {
|
|
1643
|
+
return task();
|
|
1644
|
+
}
|
|
1645
|
+
catch (error) {
|
|
1646
|
+
return error;
|
|
1647
|
+
}
|
|
1648
|
+
});
|
|
1649
|
+
const promises = results.filter(res => res instanceof Promise);
|
|
1650
|
+
if (promises.length)
|
|
1651
|
+
$mol_fail(Promise.race(promises));
|
|
1652
|
+
const error = results.find(res => res instanceof Error);
|
|
1653
|
+
if (error)
|
|
1654
|
+
$mol_fail(error);
|
|
1655
|
+
return results;
|
|
1656
|
+
}
|
|
1657
|
+
$.$mol_wire_race = $mol_wire_race;
|
|
1658
|
+
})($ || ($ = {}));
|
|
1659
|
+
//mol/wire/race/race.ts
|
|
1660
|
+
;
|
|
1661
|
+
"use strict";
|
|
1662
|
+
var $;
|
|
1639
1663
|
(function ($) {
|
|
1640
1664
|
function $mol_wire_patch(obj) {
|
|
1641
1665
|
for (const field of Reflect.ownKeys(obj)) {
|