cesr
Version:
[](https://www.npmjs.com/package/cesr) [](https://github.com/lenkan/cesr-js/blob/main/LICENSE)
14 lines (13 loc) • 499 B
TypeScript
import type { ParserOptions } from "./parser.ts";
import { type ParserInput } from "./parser.ts";
/**
* Parses JSON messages with CESR attachments from an incoming stream of bytes.
*
* @param input Incoming stream of bytes
* @returns An async iterable of messages with attachments
*/
export declare function parseMessages(input: ParserInput, options?: ParserOptions): AsyncIterableIterator<Message>;
export interface Message {
payload: Record<string, unknown>;
attachments: string[];
}