effect-io-ai

Package: effect
Module: Array

Array.of

Wraps a single value in a NonEmptyArray.

Example (Creating a single-element array)

import { Array } from "effect"

console.log(Array.of(1)) // [1]

See

Signature

declare const of: <A>(a: A) => NonEmptyArray<A>

Source

Since v2.0.0