Home > @firebase/firestore > / > LoadBundleTask > then
LoadBundleTask.then() method
Implements the Promise<LoadBundleTaskProgress>.then
interface.
Signature:
then<T, R>(onFulfilled?: (a: LoadBundleTaskProgress) => T | PromiseLike<T>, onRejected?: (a: Error) => R | PromiseLike<R>): Promise<T | R>;
Parameters
Parameter | Type | Description |
---|---|---|
onFulfilled | (a: LoadBundleTaskProgress) => T | PromiseLike<T> | Called on the completion of the loading task with a final LoadBundleTaskProgress update. The update will always have its taskState set to "Success" . |
onRejected | (a: Error) => R | PromiseLike<R> | Called when an error occurs during bundle loading. |
Returns:
Promise<T | R>