vlocode-project - v1.40.0-beta-4
    Preparing search index...

    Class ThenablePromise<T>

    A promise wrapper that supports the old NodeJS callback style with thenCall method. Used by thenablePromise decorator to make any Async function that returns a promise support the old NodeJS callback style and return the promise that supports thenCall method.

    Type Parameters

    • T

    Implements

    • Promise<T>
    Index

    Constructors

    Properties

    "[toStringTag]": "ThenablePromise" = 'ThenablePromise'
    promise: Promise<T>

    Methods

    • Attaches a callback for only the rejection of the Promise.

      Type Parameters

      • TResult = never

      Parameters

      • Optionalonrejected: null | ((reason: any) => TResult | PromiseLike<TResult>)

        The callback to execute when the Promise is rejected.

      Returns Promise<T | TResult>

      A Promise for the completion of the callback.

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

      Parameters

      • Optionalonfinally: null | (() => void)

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

      Returns Promise<T>

      A Promise for the completion of the callback.