Package: effect
Module: Array
Creates a non-empty array if either input is non-empty.
Example (Preserving non-emptiness from either input)
import type { Array } from "effect"
type Result = Array.ReadonlyArray.OrNonEmpty<
readonly [number],
ReadonlyArray<string>,
number
>
// Result is NonEmptyArray<number>
Signature
type OrNonEmpty<S, T, A> = S extends NonEmptyReadonlyArray<any> ? NonEmptyArray<A>
: T extends NonEmptyReadonlyArray<any> ? NonEmptyArray<A>
: Array<A>
Since v2.0.0