TaskOption overview
Added in v0.1.0
Table of contents
- Alternative
- Applicative
- Apply
- Compactable
- Filterable
- Functor
- Monad
- combinators
- constructors
- destructors
- instances
- model
Alternative
alt
Signature
export declare const alt: <A>(that: () => TaskOption<A>) => (fa: TaskOption<A>) => TaskOption<A>
Added in v0.1.18
zero
Signature
export declare const zero: <A>() => TaskOption<A>
Added in v0.1.18
Applicative
of
Signature
export declare const of: <A>(a: A) => TaskOption<A>
Added in v0.1.18
Apply
ap
Signature
export declare const ap: <A>(fa: TaskOption<A>) => <B>(fab: TaskOption<(a: A) => B>) => TaskOption<B>
Added in v0.1.18
apFirst
Signature
export declare const apFirst: <B>(fb: TaskOption<B>) => <A>(fa: TaskOption<A>) => TaskOption<A>
Added in v0.1.18
apSecond
Signature
export declare const apSecond: <B>(fb: TaskOption<B>) => <A>(fa: TaskOption<A>) => TaskOption<B>
Added in v0.1.18
Compactable
compact
Signature
export declare const compact: <A>(fa: TaskOption<O.Option<A>>) => TaskOption<A>
Added in v0.1.18
separate
Signature
export declare const separate: <A, B>(ma: TaskOption<Either<A, B>>) => Separated<TaskOption<A>, TaskOption<B>>
Added in v0.1.18
Filterable
filter
Signature
export declare const filter: {
<A, B extends A>(refinement: Refinement<A, B>): (fa: TaskOption<A>) => TaskOption<B>
<A>(predicate: Predicate<A>): (fa: TaskOption<A>) => TaskOption<A>
}
Added in v0.1.18
filterMap
Signature
export declare const filterMap: <A, B>(f: (a: A) => O.Option<B>) => (fa: TaskOption<A>) => TaskOption<B>
Added in v0.1.18
partition
Signature
export declare const partition: {
<A, B extends A>(refinement: Refinement<A, B>): (fa: TaskOption<A>) => Separated<TaskOption<A>, TaskOption<B>>
<A>(predicate: Predicate<A>): (fa: TaskOption<A>) => Separated<TaskOption<A>, TaskOption<A>>
}
Added in v0.1.18
partitionMap
Signature
export declare const partitionMap: <A, B, C>(
f: (a: A) => Either<B, C>
) => (fa: TaskOption<A>) => Separated<TaskOption<B>, TaskOption<C>>
Added in v0.1.18
Functor
map
Signature
export declare const map: <A, B>(f: (a: A) => B) => (fa: TaskOption<A>) => TaskOption<B>
Added in v0.1.18
Monad
chain
Signature
export declare const chain: <A, B>(f: (a: A) => TaskOption<B>) => (ma: TaskOption<A>) => TaskOption<B>
Added in v0.1.18
chainFirst
Signature
export declare const chainFirst: <A, B>(f: (a: A) => TaskOption<B>) => (ma: TaskOption<A>) => TaskOption<A>
Added in v0.1.18
chainOption
Signature
export declare const chainOption: <A, B>(f: (a: A) => O.Option<B>) => (ma: TaskOption<A>) => TaskOption<B>
Added in v0.1.4
chainOptionK
Signature
export declare const chainOptionK: <A, B>(f: (a: A) => O.Option<B>) => (ma: TaskOption<A>) => TaskOption<B>
Added in v0.1.10
chainTask
Signature
export declare const chainTask: <A, B>(f: (a: A) => Task<B>) => (ma: TaskOption<A>) => TaskOption<B>
Added in v0.1.4
flatten
Signature
export declare const flatten: <A>(mma: TaskOption<TaskOption<A>>) => TaskOption<A>
Added in v0.1.18
combinators
mapNullable
Signature
export declare const mapNullable: <A, B>(f: (a: A) => B | null | undefined) => (ma: TaskOption<A>) => TaskOption<B>
Added in v0.1.5
constructors
fromNullable
Signature
export declare const fromNullable: <A>(a: A) => TaskOption<NonNullable<A>>
Added in v0.1.4
fromOption
Signature
export declare const fromOption: <A>(ma: O.Option<A>) => TaskOption<A>
Added in v0.1.0
fromOptionK
Signature
export declare const fromOptionK: <A extends unknown[], B>(f: (...a: A) => O.Option<B>) => (...a: A) => TaskOption<B>
Added in v0.1.10
fromTask
Signature
export declare const fromTask: <A>(as: Task<A>) => TaskOption<A>
Added in v0.1.0
fromTaskEither
Signature
export declare const fromTaskEither: <A>(ma: TaskEither<any, A>) => TaskOption<A>
Added in v0.1.4
none
Signature
export declare const none: TaskOption<never>
Added in v0.1.0
some
Signature
export declare const some: <A>(a: A) => TaskOption<A>
Added in v0.1.0
tryCatch
Signature
export declare const tryCatch: <A>(f: Lazy<Promise<A>>) => TaskOption<A>
Added in v0.1.5
destructors
fold
Signature
export declare const fold: <A, B>(onNone: () => Task<B>, onSome: (a: A) => Task<B>) => (as: TaskOption<A>) => Task<B>
Added in v0.1.0
getOrElse
Signature
export declare const getOrElse: <A>(onNone: () => Task<A>) => (as: TaskOption<A>) => Task<A>
Added in v0.1.0
toNullable
Signature
export declare const toNullable: <A>(ma: TaskOption<A>) => Task<A | null>
Added in v0.1.4
toUndefined
Signature
export declare const toUndefined: <A>(ma: TaskOption<A>) => Task<A | undefined>
Added in v0.1.4
instances
Alternative
Signature
export declare const Alternative: Alternative1<'TaskOption'>
Added in v0.1.18
Applicative
Signature
export declare const Applicative: Applicative1<'TaskOption'>
Added in v0.1.18
Apply
Signature
export declare const Apply: Apply1<'TaskOption'>
Added in v0.1.18
Compactable
Signature
export declare const Compactable: Compactable1<'TaskOption'>
Added in v0.1.18
Filterable
Signature
export declare const Filterable: Filterable1<'TaskOption'>
Added in v0.1.18
Functor
Signature
export declare const Functor: Functor1<'TaskOption'>
Added in v0.1.18
Monad
Signature
export declare const Monad: Monad1<'TaskOption'>
Added in v0.1.18
URI (type alias)
Signature
export type URI = typeof URI
Added in v0.1.0
taskOption
Signature
export declare const taskOption: Monad1<'TaskOption'> & Alternative1<'TaskOption'> & Filterable1<'TaskOption'>
Added in v0.1.0
model
TaskOption (interface)
Signature
export interface TaskOption<A> extends Task<O.Option<A>> {}
Added in v0.1.0