hexo/node_modules/ajv/lib/vocabularies/dynamic/recursiveAnchor.ts

15 lines
419 B
TypeScript
Raw Normal View History

2023-10-03 11:14:36 +08:00
import type {CodeKeywordDefinition} from "../../types"
import {dynamicAnchor} from "./dynamicAnchor"
import {checkStrictMode} from "../../compile/validate"
const def: CodeKeywordDefinition = {
keyword: "$recursiveAnchor",
schemaType: "boolean",
code(cxt) {
if (cxt.schema) dynamicAnchor(cxt, "")
else checkStrictMode(cxt.it, "$recursiveAnchor: false is ignored")
},
}
export default def