cesr
Version:
[](https://www.npmjs.com/package/cesr) [](https://github.com/lenkan/cesr-js/blob/main/LICENSE)
15 lines (14 loc) • 554 B
TypeScript
import type { DataObject } from "./data-type.ts";
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<Envelope>;
export interface Envelope {
payload: DataObject;
attachments: Record<string, string[]>;
}