mirror of
https://github.com/musix-org/musix-oss
synced 2024-11-10 08:10:18 +00:00
14 lines
445 B
TypeScript
14 lines
445 B
TypeScript
export = asPromise;
|
|
|
|
type asPromiseCallback = (error: Error | null, ...params: any[]) => {};
|
|
|
|
/**
|
|
* Returns a promise from a node-style callback function.
|
|
* @memberof util
|
|
* @param {asPromiseCallback} fn Function to call
|
|
* @param {*} ctx Function context
|
|
* @param {...*} params Function arguments
|
|
* @returns {Promise<*>} Promisified function
|
|
*/
|
|
declare function asPromise(fn: asPromiseCallback, ctx: any, ...params: any[]): Promise<any>;
|