/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ /** * @internal */ export declare enum UpgradeType { NONE = 0,// Only applies for exact matches PATCH = 1,// Allow a higher patch version MINOR = 2,// Allow a higher minor version MAJOR = 3 } export declare class SemverMap { private static _compareTypes; private static _compareRules; private static _applies; private _orderedEntries?; private _parseCache; private _rules; private _typeToRuleCache; /** * Return whether we have a rule for the given typeid * * @returns true if and only if there is already a rule for the type. */ has(typeid: string): boolean; /** * Add a new rule for the given typeid. We also take in an upgrade type and the data to associate with the * rule. * * @returns true if and only if the rule was not a duplicate. */ add(typeid: string, upgrade: UpgradeType | undefined, data: any): boolean; /** * Remove the rule for the provided type. * * @returns true if and only if the rule was not a duplicate. */ remove(typeid: string): boolean; /** * Find the best rule that matches the given type. * @returns the data that was associated with the rule. */ best(typeid: string): any | undefined; /** * Reset our caches and force recomputation */ private _resetCaches; /** * Parse the provided type and return the type broken down into core type, major, minor and patch versions. */ private _parseTypeId; } //# sourceMappingURL=semvermap.d.ts.map