diff options
author | Nikita Galkin <nikita@galk.in> | 2021-09-08 13:00:04 +0300 |
---|---|---|
committer | Node.js GitHub Bot <github-bot@iojs.org> | 2021-09-17 01:42:35 +0300 |
commit | de10ab25d39da686d5337b5016420cde37d38138 (patch) | |
tree | cb034185380e1ebe4ae398ff7ae8b4bfa8075dcc /doc | |
parent | c3651453c97dfa031d389e6c1eb3190b7e0f8290 (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.md | 11 |
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 |