/** * @since 2.4.0 */ import { Applicative2C } from './Applicative.js'; import { Apply1, Apply2C } from './Apply.js'; import { Bifunctor2 } from './Bifunctor.js'; import { Chain2C } from './Chain.js'; import { Either } from './Either.js'; import { FromEither2 } from './FromEither.js'; import { FromIO2 } from './FromIO.js'; import { FromTask2 } from './FromTask.js'; import { FromThese2 } from './FromThese.js'; import { LazyArg } from './function.js'; import { Functor2 } from './Functor.js'; import { IO } from './IO.js'; import { IOEither } from './IOEither.js'; import { Monad2C } from './Monad.js'; import { MonadTask2C } from './MonadTask.js'; import { Option } from './Option.js'; import { Pointed2 } from './Pointed.js'; import { Predicate } from './Predicate.js'; import { ReadonlyNonEmptyArray } from './ReadonlyNonEmptyArray.js'; import { Refinement } from './Refinement.js'; import { Semigroup } from './Semigroup.js'; import * as T from './Task.js'; import * as TH from './These.js'; type These = TH.These; type Task = T.Task; /** * @category model * @since 2.4.0 */ export interface TaskThese extends Task> { } /** * @category constructors * @since 2.4.0 */ export declare const left: (e: E) => TaskThese; /** * @category constructors * @since 2.4.0 */ export declare const right: (a: A) => TaskThese; /** * @category constructors * @since 2.4.0 */ export declare const both: (e: E, a: A) => TaskThese; /** * @category constructors * @since 2.4.0 */ export declare const rightTask: (ma: Task) => TaskThese; /** * @category constructors * @since 2.4.0 */ export declare const leftTask: (me: Task) => TaskThese; /** * @category constructors * @since 2.4.0 */ export declare const rightIO: (ma: IO) => TaskThese; /** * @category constructors * @since 2.4.0 */ export declare const leftIO: (me: IO) => TaskThese; /** * @category conversions * @since 2.10.0 */ export declare const fromEither: (fa: Either) => TaskThese; /** * @category conversions * @since 2.11.0 */ export declare const fromThese: (fa: These) => TaskThese; /** * @category conversions * @since 2.7.0 */ export declare const fromIO: (fa: IO) => TaskThese; /** * @category conversions * @since 2.4.0 */ export declare const fromIOEither: (fa: IOEither) => TaskThese; /** * @category conversions * @since 2.7.0 */ export declare const fromTask: (fa: Task) => TaskThese; /** * @category pattern matching * @since 2.10.0 */ export declare const match: (onLeft: (e: E) => B, onRight: (a: A) => B, onBoth: (e: E, a: A) => B) => (fa: TaskThese) => Task; /** * Less strict version of [`match`](#match). * * The `W` suffix (short for **W**idening) means that the handler return types will be merged. * * @category pattern matching * @since 2.10.0 */ export declare const matchW: (onLeft: (e: E) => B, onRight: (a: A) => C, onBoth: (e: E, a: A) => D) => (ma: TaskThese) => T.Task; /** * The `E` suffix (short for **E**ffect) means that the handlers return an effect (`Task`). * * @category pattern matching * @since 2.10.0 */ export declare const matchE: (onLeft: (e: E) => Task, onRight: (a: A) => Task, onBoth: (e: E, a: A) => Task) => (fa: TaskThese) => Task; /** * Alias of [`matchE`](#matche). * * @category pattern matching * @since 2.4.0 */ export declare const fold: (onLeft: (e: E) => Task, onRight: (a: A) => Task, onBoth: (e: E, a: A) => Task) => (fa: TaskThese) => Task; /** * Less strict version of [`matchE`](#matche). * * The `W` suffix (short for **W**idening) means that the handler return types will be merged. * * @category pattern matching * @since 2.10.0 */ export declare const matchEW: (onLeft: (e: E) => Task, onRight: (a: A) => Task, onBoth: (e: E, a: A) => Task) => (fa: TaskThese) => Task; /** * Alias of [`matchEW`](#matchew). * * @category pattern matching * @since 2.10.0 */ export declare const foldW: (onLeft: (e: E) => Task, onRight: (a: A) => Task, onBoth: (e: E, a: A) => Task) => (fa: TaskThese) => Task; /** * @since 2.4.0 */ export declare const swap: (fa: TaskThese) => TaskThese; /** * `map` can be used to turn functions `(a: A) => B` into functions `(fa: F) => F` whose argument and return types * use the type constructor `F` to represent some computational context. * * @category mapping * @since 2.4.0 */ export declare const map: (f: (a: A) => B) => (fa: TaskThese) => TaskThese; /** * Map a pair of functions over the two type arguments of the bifunctor. * * @category mapping * @since 2.4.0 */ export declare const bimap: (f: (e: E) => G, g: (a: A) => B) => (fa: TaskThese) => TaskThese; /** * Map a function over the first type argument of a bifunctor. * * @category error handling * @since 2.4.0 */ export declare const mapLeft: (f: (e: E) => G) => (fa: TaskThese) => TaskThese; /** * @category constructors * @since 2.7.0 */ export declare const of: (a: A) => TaskThese; /** * @category type lambdas * @since 2.4.0 */ export declare const URI = "TaskThese"; /** * @category type lambdas * @since 2.4.0 */ export type URI = typeof URI; declare module './HKT.js' { interface URItoKind2 { readonly [URI]: TaskThese; } } /** * @category instances * @since 2.10.0 */ export declare const getApply: (A: Apply1, S: Semigroup) => Apply2C; /** * @category instances * @since 2.7.0 */ export declare function getApplicative(A: Apply1, S: Semigroup): Applicative2C; /** * @category instances * @since 2.10.0 */ export declare function getChain(S: Semigroup): Chain2C; /** * @category instances * @since 2.4.0 */ export declare function getMonad(S: Semigroup): Monad2C & MonadTask2C; /** * @category instances * @since 2.10.0 */ export declare const Functor: Functor2; /** * @category mapping * @since 2.10.0 */ export declare const flap: (a: A) => (fab: import("./HKT.js").Kind2<"TaskThese", E, (a: A) => B>) => import("./HKT.js").Kind2<"TaskThese", E, B>; /** * @category instances * @since 2.10.0 */ export declare const Pointed: Pointed2; /** * @category instances * @since 2.10.0 */ export declare const Bifunctor: Bifunctor2; /** * @category instances * @since 2.10.0 */ export declare const FromEither: FromEither2; /** * @category conversions * @since 2.10.0 */ export declare const fromOption: (onNone: LazyArg) => (fa: Option) => TaskThese; /** * @category lifting * @since 2.10.0 */ export declare const fromOptionK: (onNone: LazyArg) => , B>(f: (...a: A) => Option) => (...a: A) => TaskThese; /** * @category lifting * @since 2.10.0 */ export declare const fromPredicate: { (refinement: Refinement, onFalse: (a: A) => E): (a: A) => TaskThese; (predicate: Predicate, onFalse: (a: A) => E): (b: B) => TaskThese; (predicate: Predicate, onFalse: (a: A) => E): (a: A) => TaskThese; }; /** * @category instances * @since 2.11.0 */ export declare const FromThese: FromThese2; /** * @category lifting * @since 2.11.0 */ export declare const fromTheseK: , E, B>(f: (...a: A) => TH.These) => (...a: A) => TaskThese; /** * @category instances * @since 2.10.0 */ export declare const FromIO: FromIO2; /** * @category lifting * @since 2.10.0 */ export declare const fromIOK: , B>(f: (...a: A) => IO) => (...a: A) => TaskThese; /** * @category instances * @since 2.10.0 */ export declare const FromTask: FromTask2; /** * @category lifting * @since 2.10.0 */ export declare const fromTaskK: , B>(f: (...a: A) => T.Task) => (...a: A) => TaskThese; /** * @since 2.10.0 */ export declare const toTuple2: (e: LazyArg, a: LazyArg) => (fa: TaskThese) => Task; /** * @since 2.11.0 */ export declare const ApT: TaskThese; /** * Equivalent to `ReadonlyNonEmptyArray#traverseWithIndex(getApplicative(T.ApplicativePar, S))`. * * @category traversing * @since 2.11.0 */ export declare const traverseReadonlyNonEmptyArrayWithIndex: (S: Semigroup) => ((f: (index: number, a: A) => TaskThese) => (as: ReadonlyNonEmptyArray) => TaskThese>); /** * Equivalent to `ReadonlyArray#traverseWithIndex(getApplicative(T.ApplicativePar, S))`. * * @category traversing * @since 2.11.0 */ export declare const traverseReadonlyArrayWithIndex: (S: Semigroup) => (f: (index: number, a: A) => TaskThese) => ((as: ReadonlyArray) => TaskThese>); /** * Equivalent to `ReadonlyNonEmptyArray#traverseWithIndex(getApplicative(T.ApplicativeSeq, S))`. * * @category traversing * @since 2.11.0 */ export declare const traverseReadonlyNonEmptyArrayWithIndexSeq: (S: Semigroup) => (f: (index: number, a: A) => TaskThese) => (as: ReadonlyNonEmptyArray) => TaskThese>; /** * Equivalent to `ReadonlyArray#traverseWithIndex(getApplicative(T.ApplicativeSeq, S))`. * * @category traversing * @since 2.11.0 */ export declare const traverseReadonlyArrayWithIndexSeq: (S: Semigroup) => (f: (index: number, a: A) => TaskThese) => ((as: ReadonlyArray) => TaskThese>); /** * Use [`Functor`](#functor) instead. * * @category zone of death * @since 2.7.0 * @deprecated */ export declare const functorTaskThese: Functor2; /** * Use [`Bifunctor`](#bifunctor) instead. * * @category zone of death * @since 2.7.0 * @deprecated */ export declare const bifunctorTaskThese: Bifunctor2; /** * Use [`toTuple2`](#totuple2) instead. * * @category zone of death * @since 2.4.0 * @deprecated */ export declare const toTuple: (e: E, a: A) => ((fa: TaskThese) => Task<[E, A]>); /** * This instance is deprecated, use small, specific instances instead. * For example if a function needs a `Functor` instance, pass `TT.Functor` instead of `TT.taskThese` * (where `TT` is from `import TT from 'fp-ts/TaskThese'`) * * @category zone of death * @since 2.4.0 * @deprecated */ export declare const taskThese: Functor2 & Bifunctor2; /** * Use [`getApplySemigroup`](./Apply.ts.html#getapplysemigroup) instead. * * @category zone of death * @since 2.4.0 * @deprecated */ export declare const getSemigroup: (SE: Semigroup, SA: Semigroup) => Semigroup>; export {};