import type { AttributeToken } from 'pug-lexer'; import type { SortAttributesBeginningOption, SortAttributesEndOption, SortAttributesOption } from './types'; /** Compare result. */ declare type CompareResult = -1 | 0 | 1; /** Compare function. */ declare type CompareFunction = (a: T, b: T) => CompareResult; /** * Compare two attributes with each other. * * @param a An attribute token. * @param b An attribute token. * @param sortAttributes How to sort attributes. * @param sortAttributesBeginning Attributes that should sorted to the beginning. * @param sortAttributesEnd Attributes that should sorted to the end. * @returns The compare result. */ export declare function compareAttributeToken(a: AttributeToken, b: AttributeToken, sortAttributes: SortAttributesOption, sortAttributesBeginning: SortAttributesBeginningOption, sortAttributesEnd: SortAttributesEndOption): CompareResult; /** * Sort an array with a given compare function. * * @param array The array to sort. * @param compare A function for comparing the values. * @returns The sorted array. */ export declare function stableSort(array: ReadonlyArray, compare: CompareFunction): T[]; /** * Partially sorts an array. * * @param arr The array to sort. * @param start The start from where to sort. * @param end The end to where to sort. * @param compareFn A function for comparing the values. * @returns The sorted array. */ export declare function partialSort(arr: ReadonlyArray, start: number, end: number, compareFn: CompareFunction): T[]; export {};