Variable: isPromise
constisPromise:TypePredicate<unknown,Promise<unknown>>
Defined in: predicate/guards/index.ts:368
Type guard that checks if a value is a Promise.
Param
The value to check
Returns
True if value is a Promise
Example
import { isPromise } from 'receta/predicate'
isPromise(Promise.resolve(42)) // => true
isPromise(async () => {}) // => false (it's a function)
await isPromise((async () => {})()) // => true (result of calling it)