timers: add promisify support
Add support for `util.promisify(setTimeout)` and `util.promisify(setImmediate)` as a proof-of-concept implementation. `clearTimeout()` and `clearImmediate()` do not work on those Promises. Includes documentation and tests. PR-URL: https://github.com/nodejs/node/pull/12442 Reviewed-By:Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Myles Borins <myles.borins@gmail.com> Reviewed-By:
Evan Lucas <evanlucas@me.com> Reviewed-By:
William Kapke <william.kapke@gmail.com> Reviewed-By:
Timothy Gu <timothygu99@gmail.com> Reviewed-By:
Teddy Katz <teddy.katz@gmail.com>
parent
e965ed16
Please register or sign in to comment