Package: effect
Module: SchemaIssue
Returns true if the given value is an Issue.
When to use
Use when you need to narrow an unknown value to Issue in error-handling
code, such as distinguishing an Issue from other error types in a catch-all
handler.
Details
TypeId brand on the value.Example (Type-guarding an unknown error)
import { SchemaIssue } from "effect"
const issue = new SchemaIssue.MissingKey(undefined)
console.log(SchemaIssue.isIssue(issue))
// true
console.log(SchemaIssue.isIssue("not an issue"))
// false
See
IssueSignature
declare const isIssue: (u: unknown) => u is Issue
Since v4.0.0