Function promiseState

Determines the state of a given promise.

  • Type Parameters

    • T = any

    Parameters

    • promise: T | Promise<T>

      The promise to check the state of.

    Returns "sync" | "async"

    • The state of the promise, which can be either 'sync' or 'async'.