aveazul
Version:
Bluebird drop-in replacement built on native Promise
12 lines (11 loc) • 422 B
TypeScript
export interface PromisifyOptions {
Promise?: PromiseConstructor;
multiArgs?: boolean;
copyProps?: boolean;
suffix?: string;
context?: unknown;
}
type NodeStyleFunction = (...args: unknown[]) => void;
type PromisifiedFunction<T> = (...args: unknown[]) => Promise<T>;
export declare function promisify<T = unknown>(fn: NodeStyleFunction, _options?: PromisifyOptions): PromisifiedFunction<T>;
export {};