/** The callback style method to promisefy */ export type PromisefyCallback = (...args: any[]) => any; /** The promisefied method */ export type PromisefiedFunction = (...args: any[]) => Promise; /** * Converts a callback based action into one returning a Promise instead. * * @param fn - The callback to promisefy * * @returns The promisefied function * * @example * ```ts * function action(name, callback) { ... callback(); } * * action = promisefy(action); * * action * .then(() => 'all good') * .catch(() => 'Something went wrong'); * ``` */ export declare function promisefy(fn: PromisefyCallback): PromisefiedFunction; export default promisefy;