/** * Transcoder par is a transcoder that executes its decoding/encoding task in parallel for * transactions that are parallelizable such as for arrays and structs. * * Lawful transcoders must be idempotent, and all derivable transcoders exported by * schemata (unless otherwise specified) are lawful. * * @since 2.0.0 */ import { type Const } from 'fp-ts/Const'; import { type Invariant2 } from 'fp-ts/Invariant'; import { type TaskEither } from 'schemata-ts/internal/task-either'; import { type Schema } from 'schemata-ts/Schema'; import type * as TCE from 'schemata-ts/TranscodeError'; /** * @since 2.0.0 * @category Model */ export interface TranscoderPar { readonly decode: (u: unknown) => TaskEither, O>; readonly encode: (o: O) => TaskEither, I>; } /** * @since 2.0.0 * @category Constructors */ export declare const success: (a: A) => TaskEither; /** * @since 2.0.0 * @category Constructors */ export declare const failure: (e: TCE.TranscodeErrors) => TaskEither; /** * Interprets a schema as a decoder * * @since 2.0.0 * @category Interpreters */ export declare const deriveTranscoderPar: (schema: Schema) => TranscoderPar; /** * @since 2.0.0 * @category URI */ export declare const URI = "schemata-ts/TranscoderPar"; /** * @since 2.0.0 * @category URI */ export type URI = typeof URI; declare module 'fp-ts/lib/HKT' { interface URItoKind2 { readonly [URI]: TranscoderPar; } } /** * @since 2.0.0 * @category Instance Methods */ export declare const imap: (f: (a: A) => B, g: (b: B) => A) => (fa: TranscoderPar) => TranscoderPar; /** * @since 2.0.0 * @category Instances */ export declare const Invariant: Invariant2; //# sourceMappingURL=TranscoderPar.d.ts.map