Unverified Commit 17467d15 authored by cjihrig's avatar cjihrig
Browse files

util: add internal createDeferredPromise()

The pattern of resolving/rejecting a Promise from outside of its
executor happens numerous times throughout the codebase (more than
what is updated here in fact). This commit abstracts that logic
into an internal utility function.

PR-URL: https://github.com/nodejs/node/pull/37095


Reviewed-By: default avatarGus Caplan <me@gus.host>
Reviewed-By: default avatarLuigi Pinca <luigipinca@gmail.com>
Reviewed-By: default avatarMichaël Zasso <targos@protonmail.com>
Reviewed-By: default avatarZijian Liu <lxxyxzj@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent fec093b6
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment