export { MultipartParser }; export type { MultipartEvent }; /** * Minimal streaming multipart parser tailored for telefunc's use case. * * Design informed by @mjackson/multipart-parser (https://github.com/mjackson/multipart-parser) * — precomputed boundary patterns, single-pass state machine, no per-chunk allocations. */ type MultipartEvent = { type: 'part-begin'; name: string; filename: string | null; contentType: string; } | { type: 'body-data'; data: Uint8Array; } | { type: 'body-end'; }; declare class MultipartParser { #private; constructor(boundary: string); /** Feed a chunk of input data. Returns events produced from processing this chunk. */ feed(chunk: Uint8Array): MultipartEvent[]; /** Signal end of input. Flushes any remaining body data. */ finish(): MultipartEvent[]; }