/** * Compare semver-style strings * * Ported from [condition.compareVersion@d138b50](https://github.com/optimizely/optimizely/blob/d138b50/src/www/js/client/condition.js#L209) * * @module */ /** * Compare an actual version against a targetedVersion; return -1 if the actual version is "semantically less" * than the targetedVersion, 1 if it is "semantically greater", and 0 if they are "semantically identical" * (similar to Array.prototype.sort compareFns). * * "Semantically" means the following: given both version numbers expressed in x.y.z... format, to the level of * precision of the targetedVersion, compare the corresponding version parts (e.g. major to major, minor to minor). * * @private * @param {string} version expressed as a string x.y.z... * @param {string} targetedVersion expressed as a string x.y.z... * @returns {number} -1 if version < targetedVersion, 1 if version > targetedVersion, 0 if they are approx. equal */ export declare function compareVersion(version: string | undefined, targetedVersion: string): number;