Swap-Aggregator-Subgraph/node_modules/graphql/jsutils/isPromise.js.flow
Richa-iitr d211083153 Revert "Revert "added handler""
This reverts commit c36ee8c5ca.
2022-07-03 07:30:05 +05:30

13 lines
348 B
Plaintext

// @flow strict
/**
* Returns true if the value acts like a Promise, i.e. has a "then" function,
* otherwise returns false.
*/
declare function isPromise(value: mixed): boolean %checks(value instanceof
Promise);
// eslint-disable-next-line no-redeclare
export default function isPromise(value) {
return typeof value?.then === 'function';
}