declare const DELIMITER_CANDIDATES: readonly ["_", "-", " ", "."]; export type Delimiter = (typeof DELIMITER_CANDIDATES)[number]; /** Pick the delimiter whose split produces the most consistent field count across `lines`. */ export declare function pickPrimaryDelimiter(lines: string[]): Delimiter; /** Split a single sample name on `delimiter`. Empty input returns `['']` so callers * always receive at least one token. */ export declare function splitMulti(name: string, delimiter: Delimiter): string[]; /** The `exp__` fields at the start of a sample name. */ export interface ExperimentHeader { code?: string; /** ISO date. Names carry it as YYMMDD, YYYYMMDD or DDMMYYYY. */ date?: string; operator?: string; } export interface TokenizedBatch { delimiter: Delimiter; /** One row of tokens for each input name, in input order. */ rows: string[][]; /** Header fields with one value in the batch. They are not in `rows`. */ experiment: ExperimentHeader; /** * Number of leading tokens that all rows share (normally the experiment * title). They cannot tell a QC sample from a study sample. */ sharedPrefix: number; } /** Read a 6- or 8-digit date token; year-first is tried before day-first. */ export declare function parseDateToken(token: string): string | undefined; /** * Sample names → token rows. * * 1. Trim; drop a file extension that all names share. * 2. Split on runs of the primary delimiter. * 3. Drop a trailing 14-digit acquisition stamp. * 4. Read the experiment header. A field moves to `experiment` when the batch * has one value for it. Any other field stays in the rows as written, so * `QC` or `WT` after the date in some names is not taken for operator * initials. * 5. Count the tokens that all names share after the header (the experiment * title), so a title word such as `std` cannot classify the batch as QC. */ export declare function tokenizeBatch(names: string[]): TokenizedBatch; export {};