Function isPromiseLike

  • Checks if the given object is a promise-like instance.

    Type Parameters

    • TResolved

      A type of the value the promise resolves to.

    • TOther

      A type of the plain, not promise-like, value.

    Parameters

    • value: TOther | PromiseLike<TResolved>

      A value to check.

    Returns value is PromiseLike<TResolved>

    true if the value is an object or function with then method, or false otherwise.

Generated using TypeDoc