import { promisify } from "https://deno.land/x/kafkasaur@v0.0.7/src/utils/promisify.ts";
Promisifies a given function that has a final callback argument.
Type Parameters
optional
$FirstParams extends unknown[] = Parameters<T> extends [...infer $FirstParams, infer _] ? $FirstParams : any[]Parameters
fn: T
Returns
(...args: $FirstParams) => Promise<Parameters<T> extends [...infer _, infer $Last] ? $Last : any>