hexo/node_modules/ajv/lib/vocabularies/validation/dependentRequired.ts

24 lines
510 B
TypeScript
Raw Normal View History

2023-09-25 15:58:56 +08:00
import type {CodeKeywordDefinition, ErrorObject} from "../../types"
import {
validatePropertyDeps,
error,
DependenciesErrorParams,
PropertyDependencies,
} from "../applicator/dependencies"
export type DependentRequiredError = ErrorObject<
"dependentRequired",
DependenciesErrorParams,
PropertyDependencies
>
const def: CodeKeywordDefinition = {
keyword: "dependentRequired",
type: "object",
schemaType: "object",
error,
code: (cxt) => validatePropertyDeps(cxt),
}
export default def