/** * Compares two values or arrays for sorting purposes. * Returns a negative number if a < b, positive if a > b, and 0 if equal. * * @template T - The type of elements being compared (string or number). * @param a - The first value or array to compare. * @param b - The second value or array to compare. * @returns A number indicating the sort order. * @example * ```typescript * compare(1, 2) // Returns -1 * compare('b', 'a') // Returns 1 * compare([1, 2], [1, 3]) // Returns -1 * ``` */ export declare const compare: (a: T | T[], b: T | T[]) => number; /** * Compares two arrays element by element for sorting purposes. * Comparison stops at the first non-equal element. * * @template T - The type of elements in the arrays (string or number). * @param a - The first array to compare. * @param b - The second array to compare. * @returns A number indicating the sort order based on the first differing element. * @example * ```typescript * compareArray([1, 2, 3], [1, 2, 4]) // Returns -1 * compareArray(['a', 'b'], ['a', 'a']) // Returns 1 * ``` */ export declare const compareArray: (a: T[], b: T[]) => number;