Option overview
A simple extension to the Effect Option module
Table of contents
Models
OptionOrNullable (type alias)
Type that synthesizes two different ways to represent an optional value. Useful to open a dev to non effect users
Signature
export type OptionOrNullable<A> = Option.Option<A> | null | undefined | A
Utils
fromNextIteratorValue
Reads the next value of an Iterator into an Option
Signature
export declare const fromNextIteratorValue: <A>(iterator: Iterator<A>) => Option.Option<A>
fromOptionOrNullable
Converts an OptionOrNullable
into an Option
.
Signature
export declare const fromOptionOrNullable: <A>(a: OptionOrNullable<A>) => Option.Option<A>
traverseEither
Transforms an Option
of an Either
in an Either
of an Option
Signature
export declare const traverseEither: <R, L>(o: Option.Option<Either.Either<R, L>>) => Either.Either<Option.Option<R>, L>