/** * Compares two version strings for sorting purposes in ascending order. * Handles both numeric versions (e.g., "1.0", "3", "3.1.1") and text versions (e.g., "latest"). * Uses natural comparison with numeric sorting for better handling of version strings. * * @param versionA - First version string to compare * @param versionB - Second version string to compare * @returns Negative if versionA < versionB, positive if versionA > versionB, zero if equal * * @example * ```typescript * ['3.1', '3', '10', 'latest', '2.0'].sort(compareVersions) * // Returns: ['2.0', '3', '3.1', '10', 'latest'] (oldest to newest) * ``` */ export declare function compareVersions(versionA: string, versionB: string): number; /** * Compares two version strings for sorting purposes in descending order (newest first). * This is a convenience wrapper around compareVersions for clearer intent. * * @param versionA - First version string to compare * @param versionB - Second version string to compare * @returns Positive if versionA < versionB, negative if versionA > versionB, zero if equal * * @example * ```typescript * ['3.1', '3', '10', 'latest', '2.0'].sort(compareVersionsDescending) * // Returns: ['latest', '10', '3.1', '3', '2.0'] (newest to oldest) * ``` */ export declare function compareVersionsDescending(versionA: string, versionB: string): number; //# sourceMappingURL=version-compare.d.ts.map