2022-08-29 13:40:03 -06:00
|
|
|
import type { PackageRule, PackageRuleInputConfig } from '../../config/types';
|
|
|
|
import type { MatcherApi } from './types';
|
|
|
|
|
|
|
|
export abstract class Matcher implements MatcherApi {
|
|
|
|
/**
|
|
|
|
* Test match packageRule against inputConfig
|
|
|
|
* @return null if no rules are defined, true if match should be applied and else false
|
|
|
|
* @param inputConfig
|
|
|
|
* @param packageRule
|
|
|
|
*/
|
|
|
|
abstract matches(
|
|
|
|
inputConfig: PackageRuleInputConfig,
|
2023-11-07 08:50:29 -07:00
|
|
|
packageRule: PackageRule,
|
2024-10-07 08:04:06 -06:00
|
|
|
): boolean | null | Promise<boolean | null>;
|
2022-08-29 13:40:03 -06:00
|
|
|
}
|