Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Option overview

Added in v0.0.1

Helpers for Options


Table of contents


getOrThrow

Signature

export function getOrThrow<E, A>(onNone: () => E): (o: O.Option<A>) => A { ... }

Added in v0.0.1

Throws an error if the option evaluates to none

orElse

Signature

export function orElse<A>(onNone: () => void): (o: O.Option<A>) => O.Option<A> { ... }

Added in v2.0.0