/// <reference types="node" />
/// <reference types="node" />
import type { WritableOptions } from 'node:stream';
import { Writable } from 'node:stream';
/**
 * Simple writable buffer stream
 * @docs: https://nodejs.org/api/stream.html#stream_writable_streams
 */
export declare class WritableBufferStream extends Writable {
    private _chunks;
    constructor(options?: WritableOptions);
    _write(chunk: Buffer, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
    _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
    toBuffer(): Buffer;
}
export declare function streamToPromise(stream: WritableBufferStream): Promise<Buffer>;
