Skip to main content
Timeout.prototype.ref - node__timers.d.ts - Node documentation
method Timeout.prototype.ref

Usage in Deno

```typescript import { Timeout } from "node:node__timers.d.ts"; ```
Timeout.prototype.ref(): this
When called, requests that the Node.js event loop _not_ exit so long as the`Timeout` is active. Calling `timeout.ref()` multiple times will have no effect. By default, all `Timeout` objects are "ref'ed", making it normally unnecessary to call `timeout.ref()` unless `timeout.unref()` had been called previously.

Return Type

this
a reference to `timeout`