hosanna-ui-docs - v0.9.0
    Preparing search index...

    HsPromise is a custom implementation of a promise-like object. It provides methods for handling asynchronous operations, including then, catch, and finally.

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index

    Constructors

    • Creates a new HsPromise instance.

      Type Parameters

      • T

      Parameters

      • Optionalexecutor: (resolve: (value?: T) => void, reject: (reason?: any) => void) => void

        A function that is executed immediately, with resolve and reject callbacks.

      Returns HsPromise<T>

    Methods

    • Attaches a callback that is executed when the promise is settled, regardless of its outcome.

      Parameters

      • callback: () => void

        A callback to execute when the promise is settled.

      Returns HsPromise<T>

      A new HsPromise that resolves or rejects based on the original promise.