Function createAwaiter

Creates an awaiter object along with a promise.

  • Type Parameters

    • T extends unknown

      The type of the value to be resolved.

    Returns [Promise<T>, IAwaiter<T>]

    An array containing the promise and the awaiter object.