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
path: root/doc
diff options
context:
space:
mode:
authorNikita Galkin <nikita@galk.in>2021-09-08 13:00:04 +0300
committerNode.js GitHub Bot <github-bot@iojs.org>2021-09-17 01:42:35 +0300
commitde10ab25d39da686d5337b5016420cde37d38138 (patch)
treecb034185380e1ebe4ae398ff7ae8b4bfa8075dcc /doc
parentc3651453c97dfa031d389e6c1eb3190b7e0f8290 (diff)
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>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/timers.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/api/timers.md b/doc/api/timers.md
index 2efd0864824..9105e93a9a6 100644
--- a/doc/api/timers.md
+++ b/doc/api/timers.md
@@ -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