Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2020-06-18 23:22:17 +0300
committerJames M Snell <jasnell@gmail.com>2020-06-23 00:29:49 +0300
commita8904e8eeea3ca513de588424bb99f6a7cdfc598 (patch)
tree35d9fc741714a1c71939b91c9b8ef69cdbf65f4c /node.gyp
parentbfc0e3f0b0bc99deffe99586bd9f03a27c6ed098 (diff)
timers: introduce timers/promises
Move the promisified timers implementations into a new sub-module to avoid the need to promisify. The promisified versions now return the timers/promises versions. Also adds `ref` option to the promisified versions ```js const { setTimeout, setImmediate } = require('timers/promises'); setTimeout(10, null, { ref: false }) .then(console.log); setImmediate(null, { ref: false }) .then(console.log); ``` Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/33950 Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Diffstat (limited to 'node.gyp')
-rw-r--r--node.gyp1
1 files changed, 1 insertions, 0 deletions
diff --git a/node.gyp b/node.gyp
index 0af72d48c25..6d9e9cb3fc0 100644
--- a/node.gyp
+++ b/node.gyp
@@ -85,6 +85,7 @@
'lib/_stream_wrap.js',
'lib/string_decoder.js',
'lib/sys.js',
+ 'lib/timers/promises.js',
'lib/timers.js',
'lib/tls.js',
'lib/_tls_common.js',