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

JetStreamBatch.ts overview

Since v0.1.0


Exports Grouped by Category


models

JetStreamBatch (interface)

Represents a NATS JetStream Batch

Signature

export interface JetStreamBatch {
  readonly [TypeId]: TypeId
  readonly id: string
  readonly count: number
  readonly add: (
    subj: string,
    payload?: Uint8Array | string,
    opts?: Partial<JetStream.BatchMessageOptions | JetStream.BatchMessageOptionsWithReply>
  ) => Effect.Effect<void, NATSError.JetStreamBatchError>
  readonly commit: (
    ...params: Parameters<JetStream.Batch["commit"]>
  ) => Effect.Effect<JetStream.BatchAck, NATSError.JetStreamBatchError>

  /** @internal */
  readonly batch: JetStream.Batch
}

Source

Since v0.1.0

type ids

TypeId

Signature

declare const TypeId: unique symbol

Source

Since v0.1.0

TypeId (type alias)

Signature

type TypeId = typeof TypeId

Source

Since v0.1.0