Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ForwardPromise<T>

ForwardPromise is a promise that makes the result value immediately available. ForwardPromise is returned where it is safe to access the result before it has been fully initialized remotely. You can choose to wait on this promise if you need to know when the resource has been fully created on the host.

Type parameters

  • T

Hierarchy

  • Promise<T>
    • ForwardPromise

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • Constructs a new instance of a ForwardPromise.

    Parameters

    • _value: T

      The result value of the promise.

    • executor: function

      Promise execution handler.

        • (resolve: function, reject: function): void
        • Parameters

          • resolve: function
              • (value?: T | PromiseLike<T>): void
              • Parameters

                • Optional value: T | PromiseLike<T>

                Returns void

          • reject: function
              • (reason?: any): void
              • Parameters

                • Optional reason: any

                Returns void

          Returns void

    Returns ForwardPromise

Properties

__@toStringTag

__@toStringTag: "Promise"

Static Promise

Promise: PromiseConstructor

Accessors

value

  • get value(): T

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.

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.

Static Reject

Static Resolve