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

LegacyAdapters.convertCallbackToPromise() method

Signature:

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

Parameters

Parameter Type Description
fn (arg1: TArg1, cb: LegacyCallback<TResult, TError>) => void  
arg1 TArg1  

Returns:

Promise<TResult>