import { Deno } from "https://deno.land/x/deno@v2.0.4/cli/tsc/dts/lib.deno.ns.d.ts";
const { UnsafeCallback } = Deno;
Creates an UnsafeCallback
and calls ref()
once to allow it to
wake up the Deno event loop when called from foreign threads.
This also stops Deno's process from exiting while the callback still exists and is not unref'ed.
Type Parameters
optional
Definition extends UnsafeCallbackDefinition = UnsafeCallbackDefinitionParameters
definition: Definition
callback: UnsafeCallbackFunction<Definition["parameters"], Definition["result"]>