TranscoderPar overview

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.

Added in v2.0.0


Table of contents


Constructors

failure

Signature

export declare const failure: <A>(e: TCE.TranscodeErrors) => TaskEither<TCE.TranscodeErrors, A>

Added in v2.0.0

success

Signature

export declare const success: <A>(a: A) => TaskEither<TCE.TranscodeErrors, A>

Added in v2.0.0

Instance Methods

imap

Signature

export declare const imap: <A, B>(f: (a: A) => B, g: (b: B) => A) => <I>(fa: TranscoderPar<I, A>) => TranscoderPar<I, B>

Added in v2.0.0

Instances

Invariant

Signature

export declare const Invariant: Invariant2<'schemata-ts/TranscoderPar'>

Added in v2.0.0

Interpreters

deriveTranscoderPar

Interprets a schema as a decoder

Signature

export declare const deriveTranscoderPar: <I, O>(schema: Schema<I, O>) => TranscoderPar<I, O>

Added in v2.0.0

Model

TranscoderPar (interface)

Signature

export interface TranscoderPar<I, O> {
  readonly decode: (u: unknown) => TaskEither<Const<TCE.TranscodeErrors, I>, O>
  readonly encode: (o: O) => TaskEither<Const<TCE.TranscodeErrors, O>, I>
}

Added in v2.0.0

URI

URI

Signature

export declare const URI: 'schemata-ts/TranscoderPar'

Added in v2.0.0

URI (type alias)

Signature

export type URI = typeof URI

Added in v2.0.0