Package: effect
Module: Predicate
Checks whether a value is a symbol.
When to use
Use when you need a Predicate guard to narrow an unknown value to a
symbol.
Details
Uses typeof input === "symbol".
Example (Guarding symbols)
import { Predicate } from "effect"
const data: unknown = Symbol.for("id")
if (Predicate.isSymbol(data)) {
console.log(data.description)
}
See
isPropertyKeySignature
declare const isSymbol: (input: unknown) => input is symbol
Since v2.0.0