@naturalcycles/js-lib
Version:
Standard library for universal (browser + Node.js) javascript
10 lines (9 loc) • 300 B
TypeScript
/**
* Returns the state of the Promise, one of:
* - pending
* - resolved
* - rejected
*
* Based on: https://makandracards.com/makandra/46681-javascript-how-to-query-the-state-of-a-native-promise
*/
export declare function pState(p: Promise<any>): Promise<'resolved' | 'rejected' | 'pending'>;