interface ParsedVersion { string: string; version: number[]; beta?: number[]; } type Operator = '<=' | '==' | '>=' | '>' | '<'; declare function parse(versionString: string): ParsedVersion; /** * Compare two version strings. * @returns 0 if equal, -1 if versionA < versionB, 1 if versionA > versionB */ declare function compare(versionA: string, versionB: string): number; /** * Compare two version strings with an operator. * @returns true if the comparison is true, false otherwise */ declare function compare(versionA: string, operator: Operator, versionB: string): boolean; declare function format(version: string): string; declare const VersionUtil: { compare: typeof compare; parse: typeof parse; format: typeof format; }; declare global { interface Window { VersionUtil: typeof VersionUtil; } } export default VersionUtil;