From 7fdb12739dd7b7b29baf51474ab2a9a99b36c34a 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 cfbc8f1ead4b71..b5a00619edbc36 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()`