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 39953x 39953x 39953x 39953x 39953x 39953x 39953x 26780x 26780x 39953x 39953x 39953x 39953x 39953x 41x 41x 25266x 25266x 41x 41x 60x 60x 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 }; |