Package: effect
Module: Predicate
Checks whether a value is a boolean.
When to use
Use when you need a Predicate guard to narrow an unknown value to a
boolean.
Details
Uses typeof input === "boolean".
Example (Guarding booleans)
import { Predicate } from "effect"
const data: unknown = true
if (Predicate.isBoolean(data)) {
console.log(data ? "yes" : "no")
}
See
isStringisNumberSignature
declare const isBoolean: (input: unknown) => input is boolean
Since v2.0.0