/** * Issue Sorting Utilities * * Provides sorting and priority extraction for backlog management */ export interface SortOptions { orderBy: 'priority' | 'created' | 'updated'; direction: 'asc' | 'desc'; priorityConfig: { labelPrefix: string; }; } export interface Issue { id: string; number: number; title: string; description: string; labels: string[]; url: string; state: string; createdAt?: string; updatedAt?: string; } /** * Sort issues according to strategy * * @param issues - Array of issues to sort * @param options - Sort options including orderBy, direction, and priority config * @returns Sorted array of issues * * @remarks * Priority sorting has inverted direction semantics compared to date sorting: * * **Priority Sorting:** * - `direction: 'desc'` (default) = Highest priority first = priority-1, priority-2, priority-3, ... * - `direction: 'asc'` = Lowest priority first = priority-4, priority-3, priority-2, priority-1 * * This is because "descending priority" means "descending importance" (highest first), * which corresponds to ascending numeric values (1 < 2 < 3). * * **Date Sorting:** * - `direction: 'desc'` = Newest first (standard descending chronological order) * - `direction: 'asc'` = Oldest first (standard ascending chronological order) */ export declare function sortIssues(issues: Issue[], options: SortOptions): Issue[]; //# sourceMappingURL=sorting.d.ts.map