/// /// import { Duplex } from "stream"; import Logger from "../classes/Logger"; import { JSONParsed, JSONValue } from "../types/global"; export type Content = string | Buffer | ArrayBuffer | Map | Set | number | boolean | undefined | symbol | { toString(): string; } | Function | JSONValue[] | JSONParsed; export type ParseContentReturns = Awaited>; /** * Parse almost anything into a Buffer that resolves to a string in a streamed manner * @example * ``` * const parseStream = new ParseStream(...) * ``` * @since 7.9.0 */ export declare class ParseStream extends Duplex { /** * Create a new Stream for Parsing Content on the fly * @since 7.9.0 */ constructor(options?: { /** * Whether to prettify output (currently just JSONs) * @default false * @since 7.9.0 */ prettify?: boolean; }, logger?: Logger); } /** * Parse almost anything into a Buffer that resolves to a string * @since 5.0.0 */ export default function parseContent(content: Content, prettify?: boolean, logger?: Logger): Promise<{ headers: Record; content: ArrayBuffer; }>;