Skip to main content

ref

method Timeout.prototype.ref
Jump to headingTimeout.prototype.ref(): this

When called, requests that the Node.js event loop not exit so long as theTimeout 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 Jump to heading

this

a reference to timeout

Back to top