Package: effect
Module: Option
Converts an Option into an Array.
If the input is None, an empty array is returned.
If the input is Some, its value is wrapped in a single-element array.
Example
import { Option } from "effect"
console.log(Option.toArray(Option.some(1)))
// Output: [1]
console.log(Option.toArray(Option.none()))
// Output: []
Signature
declare const toArray: <A>(self: Option<A>) => Array<A>
Since v2.0.0