Function resolvePromiseOrValue

  • Calls callback with the resolved value of object. In case object is a Promise, the result will also be a Promise, otherwise the result will be sync.

    Type Parameters

    • TIn

    • TOut

    Parameters

    • object: PromiseOrValue<TIn>
    • callback: ((val) => TOut)
        • (val): TOut
        • Parameters

          • val: TIn

          Returns TOut

    Returns PromiseOrValue<TOut>