UNPKG

@monstermann/fn

Version:

A utility library for TypeScript.

22 lines 484 B
//#region src/promise/isPromise.d.ts /** * `isPromise(target)` * * Checks if `target` is a Promise instance. * * ```ts * isPromise(Promise.resolve()); // true * isPromise("hello"); // false * ``` * * ```ts * pipe(Promise.resolve(), isPromise()); // true * pipe("hello", isPromise()); // false * ``` */ declare const isPromise: { (): (target: unknown) => target is Promise<unknown>; (target: unknown): target is Promise<unknown>; }; //#endregion export { isPromise };