Class ProgressRealmPromise

Implements

Properties

Accessors

Methods

Properties

catch: (<TResult>(onrejected?) => Promise<Realm | TResult>) = ...

Type declaration

    • <TResult>(onrejected?): Promise<Realm | TResult>
    • Attaches a callback for only the rejection of the Promise.

      Type Parameters

      • TResult = never

      Parameters

      • Optional onrejected: null | ((reason) => TResult | PromiseLike<TResult>)

        The callback to execute when the Promise is rejected.

      Returns Promise<Realm | TResult>

      A Promise for the completion of the callback.

finally: ((onfinally?) => Promise<Realm>) = ...

Type declaration

    • (onfinally?): Promise<Realm>
    • Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.

      Parameters

      • Optional onfinally: null | (() => void)

        The callback to execute when the Promise is settled (fulfilled or rejected).

      Returns Promise<Realm>

      A Promise for the completion of the callback.

then: (<TResult1, TResult2>(onfulfilled?, onrejected?) => Promise<TResult1 | TResult2>) = ...

Type declaration

    • <TResult1, TResult2>(onfulfilled?, onrejected?): Promise<TResult1 | TResult2>
    • Attaches callbacks for the resolution and/or rejection of the Promise.

      Type Parameters

      • TResult1 = Realm

      • TResult2 = never

      Parameters

      Returns Promise<TResult1 | TResult2>

      A Promise for the completion of which ever callback is executed.

Accessors

Methods

  • Cancels the download of the Realm If multiple ProgressRealmPromise instances are in progress for the same Realm, then canceling one of them will cancel all of them.

    Returns void

  • Register to receive progress notifications while the download is in progress.

    Parameters

    • callback: ProgressNotificationCallback

      Called multiple times as the client receives data, with two arguments:

      1. transferred The current number of bytes already transferred
      2. transferable The total number of transferable bytes (i.e. the number of bytes already transferred plus the number of bytes pending transfer)

    Returns this

Generated using TypeDoc