|
| 1 | +/** |
| 2 | + * Flowtype definitions for semver |
| 3 | + * Generated by Flowgen from a Typescript Definition |
| 4 | + * Flowgen v1.14.1 |
| 5 | + */ |
| 6 | + |
| 7 | +import semver from "../index"; |
| 8 | +declare class SemVer { |
| 9 | + constructor( |
| 10 | + version: string | SemVer, |
| 11 | + optionsOrLoose?: boolean | semver.Options |
| 12 | + ): this; |
| 13 | + raw: string; |
| 14 | + loose: boolean; |
| 15 | + options: semver.Options; |
| 16 | + format(): string; |
| 17 | + inspect(): string; |
| 18 | + major: number; |
| 19 | + minor: number; |
| 20 | + patch: number; |
| 21 | + version: string; |
| 22 | + build: $ReadOnlyArray<string>; |
| 23 | + prerelease: $ReadOnlyArray<string | number>; |
| 24 | + |
| 25 | + /** |
| 26 | + * Compares two versions excluding build identifiers (the bit after `+` in the semantic version string). |
| 27 | + * @return - `0` if `this` == `other` |
| 28 | + * - `1` if `this` is greater |
| 29 | + * - `-1` if `other` is greater. |
| 30 | + */ |
| 31 | + compare(other: string | SemVer): 1 | 0 | -1; |
| 32 | + |
| 33 | + /** |
| 34 | + * Compares the release portion of two versions. |
| 35 | + * @return - `0` if `this` == `other` |
| 36 | + * - `1` if `this` is greater |
| 37 | + * - `-1` if `other` is greater. |
| 38 | + */ |
| 39 | + compareMain(other: string | SemVer): 1 | 0 | -1; |
| 40 | + |
| 41 | + /** |
| 42 | + * Compares the prerelease portion of two versions. |
| 43 | + * @return - `0` if `this` == `other` |
| 44 | + * - `1` if `this` is greater |
| 45 | + * - `-1` if `other` is greater. |
| 46 | + */ |
| 47 | + comparePre(other: string | SemVer): 1 | 0 | -1; |
| 48 | + |
| 49 | + /** |
| 50 | + * Compares the build identifier of two versions. |
| 51 | + * @return - `0` if `this` == `other` |
| 52 | + * - `1` if `this` is greater |
| 53 | + * - `-1` if `other` is greater. |
| 54 | + */ |
| 55 | + compareBuild(other: string | SemVer): 1 | 0 | -1; |
| 56 | + inc(release: semver.ReleaseType, identifier?: string): SemVer; |
| 57 | +} |
| 58 | +declare module.exports: typeof SemVer; |
0 commit comments