import { SchemaRule } from "../../types/rule-types.mjs"; import { SchemaContext } from "../../types/context-types.mjs"; //#region ../@warlock.js/seal/src/rules/conditional/required-when-rule.d.ts /** * Required when callback returns true. * * The callback receives only the SchemaContext (not the value), * because "required" is about surrounding conditions, not the field itself. * * @example * ```ts * v.string().requiredWhen((context) => { * return context.allData.notificationMethod === 'email'; * }) * ``` */ declare const requiredWhenRule: SchemaRule<{ callback: (context: SchemaContext) => boolean | Promise; }>; //#endregion export { requiredWhenRule }; //# sourceMappingURL=required-when-rule.d.mts.map