Home > @rushstack/node-core-library > LegacyAdapters > convertCallbackToPromise
LegacyAdapters.convertCallbackToPromise() method
Signature:
static convertCallbackToPromise<TResult, TError, TArg1, TArg2, TArg3, TArg4>(fn: (arg1: TArg1, arg2: TArg2, arg3: TArg3, arg4: TArg4, cb: LegacyCallback<TResult, TError>) => void, arg1: TArg1, arg2: TArg2, arg3: TArg3, arg4: TArg4): Promise<TResult>;
Parameters
Parameter | Type | Description |
---|---|---|
fn | (arg1: TArg1, arg2: TArg2, arg3: TArg3, arg4: TArg4, cb: LegacyCallback<TResult, TError>) => void | |
arg1 | TArg1 | |
arg2 | TArg2 | |
arg3 | TArg3 | |
arg4 | TArg4 |
Returns:
Promise<TResult>