/** * @file Range / set helpers — `satisfiesVersion` / `filterVersions` check * membership against a semver range, `maxVersion` / `minVersion` pick the * bounds of an arbitrary version array. The bound pickers use the vendored * `semver` directly because the prerelease-inclusion options aren't part of * the smol-versions surface. */ /** * Get all versions from an array that satisfy a semver range. * * @example * ;```typescript * filterVersions(['1.0.0', '1.5.0', '2.0.0'], '>=1.0.0 <2.0.0') * // ['1.0.0', '1.5.0'] * ``` */ export declare function filterVersions(versions: string[], range: string): string[]; /** * Get the highest version from an array of versions. * * @example * ;```typescript * maxVersion(['1.0.0', '2.0.0', '1.5.0']) // '2.0.0' * ``` */ export declare function maxVersion(versions: string[]): string | undefined; /** * Get the lowest version from an array of versions. * * @example * ;```typescript * minVersion(['1.0.0', '2.0.0', '1.5.0']) // '1.0.0' * ``` */ export declare function minVersion(versions: string[]): string | undefined; /** * Check if a version satisfies a semver range. * * @example * ;```typescript * satisfiesVersion('1.5.0', '>=1.0.0 <2.0.0') // true * satisfiesVersion('3.0.0', '>=1.0.0 <2.0.0') // false * ``` */ export declare function satisfiesVersion(version: string, range: string): boolean;