routie dev init since i didn't adhere to any proper guidance up until now

This commit is contained in:
2026-04-29 22:27:29 -06:00
commit e1dabb71e2
15301 changed files with 3562618 additions and 0 deletions
@@ -0,0 +1,25 @@
import {
ComparatorByOptionsComputer,
Comparator,
} from './default-comparator-by-options-computer.js'
import { CommonOptions } from '../../types/common-options.js'
import { SortingNode } from '../../types/sorting-node.js'
/**
* Computes the array of comparators to use for sorting based on options.
*
* Returns an array containing the main comparator and a fallback comparator. If
* the main comparator is the unsorted comparator, returns an empty array since
* no sorting should be performed.
*
* @param comparatorByOptionsComputer - Function that creates a comparator from
* options.
* @param options - The sorting options including fallback sort configuration.
* @returns An array of comparators, or empty array if sorting is disabled.
*/
export declare function computeComparators<
Options extends Pick<CommonOptions, 'fallbackSort'>,
T extends SortingNode,
>(
comparatorByOptionsComputer: ComparatorByOptionsComputer<Options, T>,
options: Options,
): Comparator<T>[]