Type Parameters
-
P extends PromiseLike<T>
-
T = Awaited<P>
Parameters
-
promise: P
-
Optional
callback: ((err, value) => any)
-
- (err, value): any
-
Parameters
-
err: any
-
value: undefined | T
Returns any
Returns PromiseLike<T> | P
Promise object on which the callback is integrated
Helper method to support old NodeJS callback style on promises