Creates a new RnPromise instance from an existing Promise
The Promise to wrap
Creates a new RnPromise instance from a promise function
The promise executor function
Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.
Optional
onFinally: OnFinallyFnThe callback to execute when the Promise is settled
A Promise for the completion of the callback
Attaches callbacks for the resolution and/or rejection of the Promise. This method also handles progress tracking when used with Promise.all and a callback.
A Promise for the completion of which ever callback is executed
Static
allCreates a Promise that resolves when all input promises resolve, with optional progress callback. The callback function is called whenever a promise in the array resolves or rejects, providing real-time progress information.
Array of promises to wait for
Optional
callback: RnPromiseCallbackOptional callback function to monitor progress
A Promise that resolves with an array of all resolved values
Static
raceStatic
rejectStatic
resolve
Extended Promise class that provides additional functionality including progress callbacks for Promise.all operations. This class wraps the native Promise and adds monitoring capabilities for batch promise operations.