Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/node-core-library > LegacyAdapters > convertCallbackToPromise

LegacyAdapters.convertCallbackToPromise() method

Signature:

static convertCallbackToPromise<TResult, TError, TArg1, TArg2>(fn: (arg1: TArg1, arg2: TArg2, cb: LegacyCallback<TResult, TError>) => void, arg1: TArg1, arg2: TArg2): Promise<TResult>;

Parameters

ParameterTypeDescription
fn(arg1: TArg1, arg2: TArg2, cb: LegacyCallback<TResult, TError>) => void
arg1TArg1
arg2TArg2

Returns:

Promise<TResult>