alias for Promise.withResolvers.
create a promise with external resolver and rejecter functions, provided in an object form.
if you'd like a more minifiable version, consider using the array equivalent: promise_outside.
Warning
don't invoke this alias on node <= 20, since it isn't available there,
and the deno-to-node transformer does not polyfill this function for some reason.
TODO: in the future, when this is no longer an issue, get rid of the optional chaining operator ("?").
alias for
Promise.withResolvers
. create a promise with external resolver and rejecter functions, provided in an object form.if you'd like a more minifiable version, consider using the array equivalent: promise_outside.
don't invoke this alias on
node <= 20
, since it isn't available there, and the deno-to-node transformer does not polyfill this function for some reason.TODO: in the future, when this is no longer an issue, get rid of the optional chaining operator ("?").