Function isPromise

  • Checks if a value is a Promise.

    Parameters

    • val: unknown

      The value to check.

    Returns val is Promise<unknown>

    Returns true if the value is a Promise, else false.