import type { ServerResponse } from "http";
interface ErrorMessage {
    errorType: string;
    errorMessage: string;
    trace: string[];
}
export declare class StreamEncoder {
    #private;
    res: ServerResponse;
    static complete: Buffer;
    constructor(res: ServerResponse);
    write(chunk: any, encoding: BufferEncoding, cb?: (error: Error | null | undefined) => void): void;
    end(chunk?: Uint8Array): void;
    setHeader(key: string, value: string): void;
    destroy(): void;
    endWithError(payload: ErrorMessage): void;
    endWithJson(payload: any): void;
}
export {};
