Package: effect
Module: Array
Checks whether a value is an Array.
When to use
Use to verify a value is a mutable array, narrowing its type to Array<unknown>.
Details
Acts as a type guard narrowing the input to Array<unknown> and delegates to
globalThis.Array.isArray.
Example (Type-guarding an unknown value)
import { Array } from "effect"
console.log(Array.isArray(null)) // false
console.log(Array.isArray([1, 2, 3])) // true
See
isArrayEmpty — check for an empty arrayisArrayNonEmpty — check for a non-empty arraySignature
declare const isArray: { (self: unknown): self is Array<unknown>; <T>(self: T): self is Extract<T, ReadonlyArray<any>>; }
Since v2.0.0