@hashgraph/solo
Version:
An opinionated CLI tool to deploy and manage private Hedera Networks.
68 lines (67 loc) • 2.57 kB
TypeScript
import { SemanticVersion } from './semantic-version.js';
/**
* A range of versions which includes the beginning version and excludes the end version.
*/
export declare class VersionRange<T extends string | number> {
/**
* The beginning of the version range (inclusive).
*/
readonly begin: SemanticVersion<T>;
/**
* The end of the version range (exclusive).
*/
readonly end: SemanticVersion<T>;
constructor(
/**
* The beginning of the version range (inclusive).
*/
begin: SemanticVersion<T>,
/**
* The end of the version range (exclusive).
*/
end: SemanticVersion<T>);
/**
* Creates a version range from the given integer bounds.
*
* @param begin - the beginning of the version range (inclusive).
* @param end - the end of the version range (exclusive).
* @returns the version range.
* @throws RangeError if the bounds are invalid.
*/
static fromIntegerBounds(begin: number, end: number): VersionRange<number>;
/**
* Creates a version range from the given integer version.
*
* @param version - the specific version for which to create a range.
* @returns the version range.
* @throws RangeError if the version is invalid.
*/
static fromIntegerVersion(version: number): VersionRange<number>;
/**
* Creates a version range from the given semantic version bounds.
*
* @param begin - the beginning of the version range (inclusive).
* @param end - the end of the version range (exclusive).
* @returns the version range.
* @throws RangeError if the bounds are invalid.
*/
static fromSemanticVersionBounds<R extends string | number>(begin: SemanticVersion<R>, end: SemanticVersion<R>): VersionRange<R>;
/**
* Creates a version range which includes all patch releases for the given major and minor version.
*
* @param version - the semantic version.
* @returns the version range.
*/
static patchVersionBounds(version: SemanticVersion<string>): VersionRange<string>;
/**
* Creates a version range which includes all minor and patch releases for the given major version.
*
* @param version - the semantic version.
* @returns the version range.
*/
static minorVersionBounds<R extends string | number>(version: SemanticVersion<R>): VersionRange<R>;
equals(other: VersionRange<T>): boolean;
compare(other: VersionRange<T>): number;
contains(version: SemanticVersion<T>): boolean;
toString(): string;
}