Bun

namespace

peek

function peek<T = undefined>(
promise: T | Promise<T>
): T | Promise<T>;

Extract the value from the Promise in the same tick of the event loop

namespace peek

  • function status<T = undefined>(
    promise: T | Promise<T>
    ): 'pending' | 'fulfilled' | 'rejected';