mol_tree2 1.0.971 → 1.0.973
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.test.js +15 -12
- package/node.test.js.map +1 -1
- package/package.json +1 -1
package/node.test.js
CHANGED
|
@@ -4052,17 +4052,20 @@ var $;
|
|
|
4052
4052
|
"use strict";
|
|
4053
4053
|
var $;
|
|
4054
4054
|
(function ($) {
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
done
|
|
4060
|
-
fail
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4055
|
+
class $mol_promise extends Promise {
|
|
4056
|
+
done;
|
|
4057
|
+
fail;
|
|
4058
|
+
constructor(executor) {
|
|
4059
|
+
let done;
|
|
4060
|
+
let fail;
|
|
4061
|
+
super((d, f) => {
|
|
4062
|
+
done = d;
|
|
4063
|
+
fail = f;
|
|
4064
|
+
executor?.(d, f);
|
|
4065
|
+
});
|
|
4066
|
+
this.done = done;
|
|
4067
|
+
this.fail = fail;
|
|
4068
|
+
}
|
|
4066
4069
|
}
|
|
4067
4070
|
$.$mol_promise = $mol_promise;
|
|
4068
4071
|
})($ || ($ = {}));
|
|
@@ -4164,7 +4167,7 @@ var $;
|
|
|
4164
4167
|
var $;
|
|
4165
4168
|
(function ($) {
|
|
4166
4169
|
function $mol_wait_timeout_async(timeout) {
|
|
4167
|
-
const promise = $mol_promise();
|
|
4170
|
+
const promise = new $mol_promise();
|
|
4168
4171
|
const task = new this.$mol_after_timeout(timeout, () => promise.done());
|
|
4169
4172
|
return Object.assign(promise, {
|
|
4170
4173
|
destructor: () => task.destructor()
|