Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface PromiEvent<T>

Type parameters

  • T

Hierarchy

  • Promise<T>
    • PromiEvent

Index

Properties

Methods

Properties

Promise

Promise: PromiseConstructor

__@toStringTag

__@toStringTag: "Promise"

Methods

catch

  • catch<TResult>(onrejected?: function | undefined | null): Promise<T | TResult>
  • Attaches a callback for only the rejection of the Promise.

    Type parameters

    • TResult

    Parameters

    • Optional onrejected: function | undefined | null

      The callback to execute when the Promise is rejected.

    Returns Promise<T | TResult>

    A Promise for the completion of the callback.

on

  • on(type: "transactionHash", handler: function): PromiEvent<T>
  • on(type: "receipt", handler: function): PromiEvent<T>
  • on(type: "confirmation", handler: function): PromiEvent<T>
  • on(type: "error", handler: function): PromiEvent<T>
  • on(type: "error" | "confirmation" | "receipt" | "transactionHash", handler: function): PromiEvent<T>

once

  • once(type: "transactionHash", handler: function): PromiEvent<T>
  • once(type: "receipt", handler: function): PromiEvent<T>
  • once(type: "confirmation", handler: function): PromiEvent<T>
  • once(type: "error", handler: function): PromiEvent<T>
  • once(type: "error" | "confirmation" | "receipt" | "transactionHash", handler: function): PromiEvent<T>

then

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

    Type parameters

    • TResult1

    • TResult2

    Parameters

    • Optional onfulfilled: function | undefined | null

      The callback to execute when the Promise is resolved.

    • Optional onrejected: function | undefined | null

      The callback to execute when the Promise is rejected.

    Returns Promise<TResult1 | TResult2>

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

With 🖖 by Dbrain