UNPKG

@kurrent/kurrentdb-client

Version:
17 lines (16 loc) 516 B
import type { BinaryEventType, EventData } from "../types"; export type BinaryEventOptions<E extends BinaryEventType> = E & { /** * The id to this event. By default, the id will be generated. */ id?: string; /** * The binary data of the event. */ data: Uint8Array | Buffer; }; export declare const binaryEvent: <E extends BinaryEventType = { type: string; data: Uint8Array; metadata?: unknown; }>({ type, data, metadata, id, }: BinaryEventOptions<E>) => EventData<E>;