/** * Has the ability to validate arbitrary values. */ interface Rule { /** * Rule identifier. */ readonly identifier: string; /** * Check that the given value satisfies the rule. * * @param value - Arbitrary value. * @param parameters - Rule parameters. * @returns Promise rejecting if the value doesn't satisfy the rule. */ check(value: unknown, parameters: Array): Promise; } export default Rule;