Link Search Menu Expand Document

IOOption overview

Added in v0.1.14


Table of contents


Alt

alt

Signature

export declare const alt: <A>(that: () => IOOption<A>) => (fa: IOOption<A>) => IOOption<A>

Added in v0.1.18

Alternative

zero

Signature

export declare const zero: <A>() => IOOption<A>

Added in v0.1.18

Applicative

of

Signature

export declare const of: <A>(a: A) => IOOption<A>

Added in v0.1.18

Apply

ap

Signature

export declare const ap: <A>(fa: IOOption<A>) => <B>(fab: IOOption<(a: A) => B>) => IOOption<B>

Added in v0.1.18

apFirst

Signature

export declare const apFirst: <B>(fb: IOOption<B>) => <A>(fa: IOOption<A>) => IOOption<A>

Added in v0.1.18

apSecond

Signature

export declare const apSecond: <B>(fb: IOOption<B>) => <A>(fa: IOOption<A>) => IOOption<B>

Added in v0.1.18

Compactable

compact

Signature

export declare const compact: <A>(fa: IOOption<O.Option<A>>) => IOOption<A>

Added in v0.1.18

separate

Signature

export declare const separate: <A, B>(fa: IOOption<Either<A, B>>) => Separated<IOOption<A>, IOOption<B>>

Added in v0.1.18

Filterable

filter

Signature

export declare const filter: {
  <A, B extends A>(refinement: Refinement<A, B>): (fa: IOOption<A>) => IOOption<B>
  <A>(predicate: Predicate<A>): (fa: IOOption<A>) => IOOption<A>
}

Added in v0.1.18

filterMap

Signature

export declare const filterMap: <A, B>(f: (a: A) => O.Option<B>) => (fa: IOOption<A>) => IOOption<B>

Added in v0.1.18

partition

Signature

export declare const partition: {
  <A, B extends A>(refinement: Refinement<A, B>): (fa: IOOption<A>) => Separated<IOOption<A>, IOOption<B>>
  <A>(predicate: Predicate<A>): (fa: IOOption<A>) => Separated<IOOption<A>, IOOption<A>>
}

Added in v0.1.18

partitionMap

Signature

export declare const partitionMap: <A, B, C>(
  f: (a: A) => Either<B, C>
) => (fa: IOOption<A>) => Separated<IOOption<B>, IOOption<C>>

Added in v0.1.18

Functor

map

Signature

export declare const map: <A, B>(f: (a: A) => B) => (fa: IOOption<A>) => IOOption<B>

Added in v0.1.18

Monad

chain

Signature

export declare const chain: <A, B>(f: (a: A) => IOOption<B>) => (ma: IOOption<A>) => IOOption<B>

Added in v0.1.18

chainFirst

Signature

export declare const chainFirst: <A, B>(f: (a: A) => IOOption<B>) => (ma: IOOption<A>) => IOOption<A>

Added in v0.1.18

chainFirstIOK

Signature

export declare const chainFirstIOK: <A, B>(f: (a: A) => IO<B>) => (ma: IOOption<A>) => IOOption<A>

Added in v0.1.28

chainIOK

Signature

export declare const chainIOK: <A, B>(f: (a: A) => IO<B>) => (ma: IOOption<A>) => IOOption<B>

Added in v0.1.28

chainOptionK

Signature

export declare const chainOptionK: <A, B>(f: (a: A) => O.Option<B>) => (ma: IOOption<A>) => IOOption<B>

Added in v0.1.14

flatten

Signature

export declare const flatten: <A>(mma: IOOption<IOOption<A>>) => IOOption<A>

Added in v0.1.18

combinators

mapNullable

Signature

export declare const mapNullable: <A, B>(f: (a: A) => B | null | undefined) => (ma: IOOption<A>) => IOOption<B>

Added in v0.1.14

constructors

fromIO

Signature

export declare const fromIO: <A = never>(ma: IO<A>) => IOOption<A>

Added in v0.1.14

fromIOEither

Signature

export declare const fromIOEither: <A>(ma: IOEither<any, A>) => IOOption<A>

Added in v0.1.14

fromIOK

Signature

export declare const fromIOK: <A extends unknown[], B>(f: (...a: A) => IO<B>) => (...a: A) => IOOption<B>

Added in v0.1.28

fromNullable

Signature

export declare const fromNullable: <A>(a: A) => IOOption<NonNullable<A>>

Added in v0.1.14

fromOption

Signature

export declare const fromOption: <A = never>(ma: O.Option<A>) => IOOption<A>

Added in v0.1.14

fromOptionK

Signature

export declare const fromOptionK: <A extends unknown[], B>(f: (...a: A) => O.Option<B>) => (...a: A) => IOOption<B>

Added in v0.1.14

fromPredicate

Signature

export declare const fromPredicate: {
  <A, B extends A>(refinement: Refinement<A, B>): (a: A) => IOOption<B>
  <A>(predicate: Predicate<A>): <B extends A>(b: B) => IOOption<B>
  <A>(predicate: Predicate<A>): (a: A) => IOOption<A>
}

Added in v0.1.29

none

Signature

export declare const none: IOOption<never>

Added in v0.1.14

some

Signature

export declare const some: <A = never>(a: A) => IOOption<A>

Added in v0.1.14

destructors

fold

Signature

export declare const fold: <A, B>(onNone: () => IO<B>, onSome: (a: A) => IO<B>) => (ma: IOOption<A>) => IO<B>

Added in v0.1.14

getOrElse

Signature

export declare const getOrElse: <A>(onNone: () => IO<A>) => (ma: IOOption<A>) => IO<A>

Added in v0.1.14

toNullable

Signature

export declare const toNullable: <A>(ma: IOOption<A>) => IO<A | null>

Added in v0.1.14

toUndefined

Signature

export declare const toUndefined: <A>(ma: IOOption<A>) => IO<A | undefined>

Added in v0.1.14

instances

Alt

Signature

export declare const Alt: Alt1<'IOOption'>

Added in v0.1.18

Alternative

Signature

export declare const Alternative: Alternative1<'IOOption'>

Added in v0.1.18

Applicative

Signature

export declare const Applicative: Applicative1<'IOOption'>

Added in v0.1.18

Apply

Signature

export declare const Apply: Apply1<'IOOption'>

Added in v0.1.18

Compactable

Signature

export declare const Compactable: Compactable1<'IOOption'>

Added in v0.1.18

Filterable

Signature

export declare const Filterable: Filterable1<'IOOption'>

Added in v0.1.18

Functor

Signature

export declare const Functor: Functor1<'IOOption'>

Added in v0.1.18

Monad

Signature

export declare const Monad: Monad1<'IOOption'>

Added in v0.1.18

URI

Signature

export declare const URI: 'IOOption'

Added in v0.1.14

URI (type alias)

Signature

export type URI = typeof URI

Added in v0.1.14

getApplyMonoid

Signature

export declare const getApplyMonoid: <A>(M: Monoid<A>) => Monoid<IOOption<A>>

Added in v0.1.14

getApplySemigroup

Signature

export declare const getApplySemigroup: <A>(S: Semigroup<A>) => Semigroup<IOOption<A>>

Added in v0.1.14

model

IOOption (interface)

Signature

export interface IOOption<A> extends IO<Option<A>> {}

Added in v0.1.14

utils

ioOption

Signature

export declare const ioOption: Monad1<'IOOption'> & Alt1<'IOOption'> & MonadIO1<'IOOption'> & Filterable1<'IOOption'>

Added in v0.1.14