import { IReadable } from './types.js';
/** result of {@link ReaderWithFinal#readWithFinal} */
export interface ReaderWithFinalResult {
    /** number of bytes read */
    readonly nread: number;
    /** whether this was the last chunk */
    readonly final: boolean;
}
/**
 * a reader that reads one read ahead, allowing the caller to know
 * whether the chunk being read is the last one
 */
export declare class ReaderWithFinal implements IReadable {
    #private;
    constructor(readable: IReadable, params?: {
        internalBufferSize?: number;
    });
    /** read a chunk of data, and whether it is the last one */
    readWithFinal(into: Uint8Array): Promise<ReaderWithFinalResult>;
    read(into: Uint8Array): Promise<number>;
}
