import { promisify } from "https://deno.land/x/polkadot@0.2.14/util/promisify.ts";
Examples
const { promisify } from '@polkadot/util';
await promisify(null, ((a, cb) => cb(null, a), true); // resolves with `true`
await promisify(null, (cb) => cb(new Error('error!'))); // rejects with `error!`