import { Schema } from '../core/schema'; import { Context } from '../types/SchemaTypes'; import { ValidationContext } from './BaseRule'; import { RuleBooleanMethod } from './Rule'; export type WhenConfig = { /** * When "is" returns true "then", when false "otherwise" */ is: RuleBooleanMethod; then: (schema: T) => T; otherwise?: (schema: T) => T; }; export type WhenParameter = { method: RuleBooleanMethod; then: Schema; /** * Makes when named, so uses a key from parent */ namedValueKey?: string; otherwise?: Schema; }; export declare function getWhenRule(config: WhenParameter, context: Context): (value: any, validationContext: ValidationContext) => void;