doc: add timeout.close

PR-URL: https://github.com/nodejs/node/pull/40036
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
Nikita Galkin
2021-09-08 13:00:04 +03:00
committed by Node.js GitHub Bot
parent c3651453c9
commit de10ab25d3

View File

@@ -72,6 +72,17 @@ timer is active. Each of the `Timeout` objects returned by these functions
export both `timeout.ref()` and `timeout.unref()` functions that can be used to
control this default behavior.
### `timeout.close()`
<!-- YAML
added: v0.9.1
-->
> Stability: 3 - Legacy: Use [`clearTimeout()`][] instead.
* Returns: {Timeout} a reference to `timeout`
Cancels the timeout.
### `timeout.hasRef()`
<!-- YAML
added: v11.0.0