From de10ab25d39da686d5337b5016420cde37d38138 Mon Sep 17 00:00:00 2001 From: Nikita Galkin Date: Wed, 8 Sep 2021 13:00:04 +0300 Subject: [PATCH] doc: add timeout.close MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/40036 Reviewed-By: Antoine du Hamel Reviewed-By: Tobias Nießen Reviewed-By: Michaël Zasso --- doc/api/timers.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/api/timers.md b/doc/api/timers.md index 2efd0864824c0c..9105e93a9a6bb3 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()` + + +> Stability: 3 - Legacy: Use [`clearTimeout()`][] instead. + +* Returns: {Timeout} a reference to `timeout` + +Cancels the timeout. + ### `timeout.hasRef()`