| 1 | import type {CodeKeywordDefinition, ErrorObject} from "../../types" |
| 2 | import { |
| 3 | validatePropertyDeps, |
| 4 | error, |
| 5 | DependenciesErrorParams, |
| 6 | PropertyDependencies, |
| 7 | } from "../applicator/dependencies" |
| 8 | |
| 9 | export type DependentRequiredError = ErrorObject< |
| 10 | "dependentRequired", |
| 11 | DependenciesErrorParams, |
| 12 | PropertyDependencies |
| 13 | > |
| 14 | |
| 15 | const def: CodeKeywordDefinition = { |
| 16 | keyword: "dependentRequired", |
| 17 | type: "object", |
| 18 | schemaType: "object", |
| 19 | error, |
| 20 | code: (cxt) => validatePropertyDeps(cxt), |
| 21 | } |
| 22 | |
| 23 | export default def |