import type { CommandOptions } from '../types'; /** * Shared helpers for `head`/`tail`: resolve the line count from the usual flag forms and gather * inputs (named files, or stdin when none). Kept separate so both commands stay DRY. */ /** Resolve a line count from `-n N`, `-n=N`, or `-N` flags. Returns the count + remaining file args. */ export declare function resolveCount(flags: Record | undefined, args: string[], def?: number): { count: number; files: string[]; }; /** Read each file's content (or stdin when no files). Throws a CLI-style message on a bad path. */ export declare function gatherInputs(files: string[], options: CommandOptions): Promise>; /** Split into lines, dropping the single empty element a trailing newline produces (so counts match coreutils). */ export declare function toLines(content: string): string[]; //# sourceMappingURL=_textlines.d.ts.map