@web3r/flowerkit
Version:
Tree-shakable JavaScript and TypeScript utility library for frontend/browser apps: DOM, events, arrays, objects, strings, date, JSON, and network helpers (ESM/CJS, SSR-friendly).
14 lines (13 loc) • 477 B
text/typescript
export type TIsObjPromiseArgs = Parameters<typeof isObjPromise>;
export type TIsObjPromiseReturn = ReturnType<typeof isObjPromise>;
/**
* Checks if an object is promise
* @param obj{*} source object
* @returns {boolean}
* @example
* // How to check if an object is promise?
* const obj = new Promise(() => {});
* const isPromise = isObjPromise(obj);
* console.log(isPromise); // => true
*/
export declare const isObjPromise: (obj: unknown) => obj is Promise<unknown>;