Skip to main content Link Search Menu Expand Document (external link)

MsgPack overview

Added in v1.0.0


Table of contents


combinators

duplex

Signature

export declare const duplex: <R, IE, OE, OutDone, InDone>(
  self: Channel.Channel<Chunk.Chunk<Uint8Array>, Chunk.Chunk<Uint8Array>, OE, IE | MsgPackError, OutDone, InDone, R>
) => Channel.Channel<Chunk.Chunk<unknown>, Chunk.Chunk<unknown>, MsgPackError | OE, IE, OutDone, InDone, R>

Added in v1.0.0

duplexSchema

Signature

export declare const duplexSchema: {
  <IA, II, IR, OA, OI, OR>(options: {
    readonly inputSchema: Schema.Schema<IA, II, IR>
    readonly outputSchema: Schema.Schema<OA, OI, OR>
  }): <R, InErr, OutErr, OutDone, InDone>(
    self: Channel.Channel<
      Chunk.Chunk<Uint8Array>,
      Chunk.Chunk<Uint8Array>,
      OutErr,
      MsgPackError | ParseError | InErr,
      OutDone,
      InDone,
      R
    >
  ) => Channel.Channel<
    Chunk.Chunk<OA>,
    Chunk.Chunk<IA>,
    MsgPackError | ParseError | OutErr,
    InErr,
    OutDone,
    InDone,
    IR | OR | R
  >
  <R, InErr, OutErr, OutDone, InDone, IA, II, IR, OA, OI, OR>(
    self: Channel.Channel<
      Chunk.Chunk<Uint8Array>,
      Chunk.Chunk<Uint8Array>,
      OutErr,
      MsgPackError | ParseError | InErr,
      OutDone,
      InDone,
      R
    >,
    options: { readonly inputSchema: Schema.Schema<IA, II, IR>; readonly outputSchema: Schema.Schema<OA, OI, OR> }
  ): Channel.Channel<
    Chunk.Chunk<OA>,
    Chunk.Chunk<IA>,
    MsgPackError | ParseError | OutErr,
    InErr,
    OutDone,
    InDone,
    R | IR | OR
  >
}

Added in v1.0.0

constructors

pack

Signature

export declare const pack: <IE = never, Done = unknown>() => Channel.Channel<
  Chunk.Chunk<Uint8Array>,
  Chunk.Chunk<unknown>,
  IE | MsgPackError,
  IE,
  Done,
  Done
>

Added in v1.0.0

packSchema

Signature

export declare const packSchema: <A, I, R>(
  schema: Schema.Schema<A, I, R>
) => <IE = never, Done = unknown>() => Channel.Channel<
  Chunk.Chunk<Uint8Array>,
  Chunk.Chunk<A>,
  IE | MsgPackError | ParseError,
  IE,
  Done,
  Done,
  R
>

Added in v1.0.0

unpack

Signature

export declare const unpack: <IE = never, Done = unknown>() => Channel.Channel<
  Chunk.Chunk<unknown>,
  Chunk.Chunk<Uint8Array>,
  IE | MsgPackError,
  IE,
  Done,
  Done
>

Added in v1.0.0

unpackSchema

Signature

export declare const unpackSchema: <A, I, R>(
  schema: Schema.Schema<A, I, R>
) => <IE = never, Done = unknown>() => Channel.Channel<
  Chunk.Chunk<A>,
  Chunk.Chunk<Uint8Array>,
  MsgPackError | ParseError | IE,
  IE,
  Done,
  Done,
  R
>

Added in v1.0.0

errors

MsgPackError (class)

Signature

export declare class MsgPackError

Added in v1.0.0