import { Range } from "./classes/range.mjs"; import { SemVer } from "./classes/semver.mjs"; import { Comparator } from "./classes/comparator.mjs"; //#region src/types.d.ts type ReleaseType = 'major' | 'premajor' | 'minor' | 'preminor' | 'patch' | 'prepatch' | 'prerelease' | 'release'; interface Options { loose?: boolean | undefined; } interface RangeOptions extends Options { includePrerelease?: boolean | undefined; } interface CoerceOptions extends Options { /** * If the `options.includePrerelease` flag is set, then the `coerce` result will contain * prerelease and build parts of a version. For example, `1.2.3.4-rc.1+rev.2` * will preserve prerelease `rc.1` and build `rev.2` in the result. * * @default false */ includePrerelease?: boolean | undefined; /** * If the `options.rtl` flag is set, then `coerce` will return the right-most * coercible tuple that does not share an ending index with a longer coercible * tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not * `4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of * any other overlapping SemVer tuple. * * @default false */ rtl?: boolean | undefined; } type Operator = '===' | '!==' | '' | '=' | '==' | '!=' | '>' | '>=' | '<' | '<='; type ComparatorOperator = '' | '=' | '<' | '>' | '<=' | '>='; type Hilo = '>' | '<'; type OptionsOrLoose = boolean | Options | null; type RangeOptionsOrLoose = boolean | RangeOptions | null; type ParsedOptions = RangeOptions & CoerceOptions; type SemVerLike = string | SemVer; type ComparatorLike = string | Comparator; type RangeLike = string | Range; type ComparatorSet = Comparator[]; type RangeSet = ComparatorSet[]; type CompareResult = -1 | 0 | 1; type IdentifierBase = '0' | '1' | false; //#endregion export { CoerceOptions, ComparatorLike, ComparatorOperator, ComparatorSet, CompareResult, Hilo, IdentifierBase, Operator, Options, OptionsOrLoose, ParsedOptions, RangeLike, RangeOptions, RangeOptionsOrLoose, RangeSet, ReleaseType, SemVerLike };