Skip to content

Commit

Permalink
doc: add timeout.close
Browse files Browse the repository at this point in the history
PR-URL: #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>
  • Loading branch information
galkin authored and nodejs-github-bot committed Sep 16, 2021
1 parent c365145 commit de10ab2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doc/api/timers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit de10ab2

Please sign in to comment.