Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 41x 41x 41x 41x 41x 41x 39461x 39461x 39461x 39461x 39461x 39461x 39461x 26485x 26485x 39461x 39461x 39461x 39461x 39461x 41x 41x 24987x 24987x 41x 41x 59x 59x 41x 41x 41x | // Copyright (c) ZeroC, Inc.
import { Timer } from "./Timer.js";
class P extends Promise {
constructor(cb) {
let res;
let rej;
super((resolve, reject) => {
res = resolve;
rej = reject;
if (cb) {
cb(resolve, reject);
}
});
this.resolve = res;
this.reject = rej;
}
static get [Symbol.species]() {
return P;
}
static delay(ms, value) {
return new P(resolve => Timer.setTimeout(() => resolve(value), ms));
}
}
export { P as Promise };
|