<A>(self: Array<A>): self is []Checks whether a mutable Array is empty, narrowing the type to [].
Example (Checking for an empty array)
import { Array } from "effect"
console.log(Array.isArrayEmpty([])) // true
console.log(Array.isArrayEmpty([1, 2, 3])) // falseSource effect/Array.ts:8201 lines
export const const isArrayEmpty: <A>(
self: Array<A>
) => self is []
Checks whether a mutable Array is empty, narrowing the type to [].
Example (Checking for an empty array)
import { Array } from "effect"
console.log(Array.isArrayEmpty([])) // true
console.log(Array.isArrayEmpty([1, 2, 3])) // false
isArrayEmpty = <function (type parameter) A in <A>(self: Array<A>): self is []A>(self: A[]self: interface Array<T>Array<function (type parameter) A in <A>(self: Array<A>): self is []A>): self: A[]self is [] => self: A[]self.Array<T>.length: numberGets or sets the length of the array. This is a number one higher than the highest index in the array.
length === 0Referenced by 1 symbols