Package: effect
Module: Predicate
Checks whether a value is an Error.
When to use
Use when you need a Predicate guard for errors caught from unknown sources.
Details
Uses instanceof Error.
Example (Guarding errors)
import { Predicate } from "effect"
const data: unknown = new Error("boom")
console.log(Predicate.isError(data))
See
isUnknownSignature
declare const isError: (input: unknown) => input is Error
Since v2.0.0