diff options
author | Nikita Galkin <nikita@galk.in> | 2021-09-08 13:00:04 +0300 |
---|---|---|
committer | Beth Griggs <bgriggs@redhat.com> | 2021-09-22 00:27:09 +0100 |
commit | 7fdb12739dd7b7b29baf51474ab2a9a99b36c34a (patch) | |
tree | cb2a34f019e0e60f08701f4518e5edb6662b2813 | |
parent | effdfa91be71e4680887b07370e5b4053f0db1c5 (diff) | |
download | node-new-7fdb12739dd7b7b29baf51474ab2a9a99b36c34a.tar.gz |
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>
-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 cfbc8f1ead..b5a00619ed 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 |