Unverified Commit e7c51454 authored by Anna Henningsen's avatar Anna Henningsen
Browse files

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: default avatarBenjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: default avatarMatteo Collina <matteo.collina@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarMyles Borins <myles.borins@gmail.com>
Reviewed-By: default avatarEvan Lucas <evanlucas@me.com>
Reviewed-By: default avatarWilliam Kapke <william.kapke@gmail.com>
Reviewed-By: default avatarTimothy Gu <timothygu99@gmail.com>
Reviewed-By: default avatarTeddy Katz <teddy.katz@gmail.com>
parent e965ed16
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