Files
node/lib/internal
James M Snell a8904e8eee 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>
2020-06-22 14:29:49 -07:00
..
2020-06-05 12:21:49 -07:00
2020-06-22 10:58:20 -07:00
2020-05-30 17:24:43 -04:00
2020-05-27 10:24:05 +02:00
2020-06-21 17:21:12 +02:00
2020-06-22 14:29:49 -07:00
2020-06-06 11:11:02 +02:00

Internal Modules

The modules in lib/internal are intended for internal use in Node.js core only, and are not accessible with require() from user modules. These modules can be changed at any time. Reliance on these modules outside of core is not supported in any way.