/** * Accepted shape of the `pages` selection option: either a comma-separated range spec * (e.g. `"1-3,5,7"`) or an explicit array of 1-based page numbers (e.g. `[1, 2, 3, 5, 7]`). */ export type PageSelection = string | readonly number[]; /** * Normalizes a page selection into a sorted, de-duplicated array of 1-based page numbers. * * Fails fast with a {@link ComparePdfConfigurationError} on any malformed entry (non-integer, * non-positive, out of safe-integer range, descending range, unparseable token, wrong type), * when the selection resolves to no pages, or when it would expand beyond * {@link MAX_SELECTED_PAGES} — surfacing caller mistakes instead of silently comparing nothing * or exhausting memory. * * @param pages - A range spec string or an array of page numbers. Runtime-validated; the * declared type is not trusted because callers (and the CLI) may pass untyped input. * @returns Sorted unique page numbers, guaranteed to contain at least one entry. */ export declare function parsePageSelection(pages: unknown): number[];