Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deno/cli/tsc/dts/lib.deno.unstable.d.ts>Deno.UnsafeCallback#ref

A modern runtime for JavaScript and TypeScript.
Latest
method Deno.UnsafeCallback.prototype.ref
import { Deno } from "https://deno.land/x/deno@v1.41.0/cli/tsc/dts/lib.deno.unstable.d.ts";
const { UnsafeCallback } = Deno;

Increments the callback's reference counting and returns the new reference count.

After ref() has been called, the callback always wakes up the Deno event loop when called from foreign threads.

If the callback's reference count is non-zero, it keeps Deno's process from exiting.

Returns

number