Like promise but lazy. It corresponds to a task that is activated when then method is called.

Type Parameters

  • Success

  • Failure

Hierarchy

Methods

  • Type Parameters

    • U = never

    Parameters

    • handle: ((error) => U)
        • (error): U
        • Parameters

          • error: Failure

          Returns U

    Returns Future<Success | U, never>

  • Parameters

    • handle: (() => void)
        • (): void
        • Returns void

    Returns Future<Success, Failure>

  • Attaches callbacks for the resolution and/or rejection of the Promise.

    Type Parameters

    • U = Success

    • G = never

    Parameters

    • Optional handle: ((value) => U | PromiseLike<U>)

      The callback to execute when the Promise is resolved.

    • Optional onrejected: ((error) => G | PromiseLike<G>)

      The callback to execute when the Promise is rejected.

    Returns Promise<U | G>

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

Generated using TypeDoc