Package: effect
Module: Predicate
Checks whether a value is PromiseLike (has a then method).
When to use
Use when you need a Predicate guard for promise-like values with a
callable then method.
Details
Performs a structural check for a callable then.
Example (Guarding promise-like values)
import { Predicate } from "effect"
const data: unknown = { then: () => {} }
console.log(Predicate.isPromiseLike(data))
See
isPromiseSignature
declare const isPromiseLike: (input: unknown) => input is PromiseLike<unknown>
Since v2.0.0