UNPKG

500 BTypeScriptView Raw
1import semver = require('../index');
2import SemVer = require('../classes/semver');
3
4/**
5 * Pass in a comparison string, and it'll call the corresponding semver comparison function.
6 * "===" and "!==" do simple string comparison, but are included for completeness.
7 * Throws if an invalid comparison string is provided.
8 */
9declare function cmp(
10 v1: string | SemVer,
11 operator: semver.Operator,
12 v2: string | SemVer,
13 optionsOrLoose?: boolean | semver.Options,
14): boolean;
15
16export = cmp;