Function latePromise

  • Promise, which can be resolved later using external callbacks returned.

    Subsequent calls to rejector and resolver are silently ignored. Only the first call matters.

    Do not use it unless you have a good reason. This util comes in really handy when you want to do something more tricky like making .on(...) received events into awaitable stream of messages, which can be processed using .receive method.

    Type Parameters

    • T

    Returns [Promise<T>, ((value) => void), ((e) => void)]

Generated using TypeDoc