Skip to main content
variable promisify
import { promisify } from "https://deno.land/x/30_seconds_of_typescript@v1.0.1/util.ts";

Converts an asynchronous function to return a promise.

In Node 8+, you can use util.promisify

Use currying to return a function returning a Promise that calls the original function. Use the ...rest operator to pass in all the parameters.

type

(func: Function) => unknown