Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
13 lines (11 sloc) 397 Bytes
import isInstanceOf from "../isInstanceOf";
/**
* Check if given value is an instance of Promise.
*
* @param value - Value to check.
* @returns True if is a Promise, false if not.
*/
export const isPromise = <ValueType = unknown, PromiseValue = unknown>(
value: ValueType | Promise<PromiseValue>
): value is Promise<PromiseValue> => isInstanceOf(value, Promise);
export default isPromise;
You can’t perform that action at this time.