import type { FlagValue } from '../../spec/types.ts';
import { IOResult } from '../../../io/types.ts';
import type { PathSpec } from '../../../types.ts';
import type { CommandFnResult, Context } from '../../config.ts';
type Count = 'columns' | 'characters' | 'bytes';
export interface FoldFlags {
    readonly width: number;
    readonly breakSpaces: boolean;
    readonly count: Count;
}
/**
 * fold's options, -w read by mirage-rs before any operand is resolved: the
 * flags, or fold's refusal of a -w. Mirrors Python's `parse_flags`.
 */
export declare function parseFlags(bag: Record<string, FlagValue>): FoldFlags | IOResult;
export declare function foldGeneric(parsed: FoldFlags, paths: PathSpec[], ctx: Context, stream: (p: PathSpec) => AsyncIterable<Uint8Array>): CommandFnResult;
export {};
//# sourceMappingURL=fold.d.ts.map