mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
doc: add version metadata to timers/promises
Refs: https://github.com/nodejs/node/pull/33950 PR-URL: https://github.com/nodejs/node/pull/36378 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Beth Griggs <bgriggs@redhat.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
This commit is contained in:
committed by
Node.js GitHub Bot
parent
20de5f7efc
commit
2f49720bee
@@ -321,6 +321,9 @@ added: v0.0.1
|
||||
Cancels a `Timeout` object created by [`setTimeout()`][].
|
||||
|
||||
## Timers Promises API
|
||||
<!-- YAML
|
||||
added: v15.0.0
|
||||
-->
|
||||
|
||||
> Stability: 1 - Experimental
|
||||
|
||||
@@ -333,6 +336,9 @@ const timersPromises = require('timers/promises');
|
||||
```
|
||||
|
||||
### `timersPromises.setTimeout([delay[, value[, options]]])`
|
||||
<!-- YAML
|
||||
added: v15.0.0
|
||||
-->
|
||||
|
||||
* `delay` {number} The number of milliseconds to wait before resolving the
|
||||
`Promise`. **Default**: `1`.
|
||||
@@ -345,6 +351,9 @@ const timersPromises = require('timers/promises');
|
||||
cancel the scheduled `Timeout`.
|
||||
|
||||
### `timersPromises.setImmediate([value[, options]])`
|
||||
<!-- YAML
|
||||
added: v15.0.0
|
||||
-->
|
||||
|
||||
* `value` {any} A value with which the `Promise` is resolved.
|
||||
* `options` {Object}
|
||||
|
||||
Reference in New Issue
Block a user