persona-community-5/.pnpm-store/v3/files/f0/e4c89e8c1b2b217c70b280f18e25f21416d34325d31f32fcce6fad772231831225d5f978232c33e89a3844bfbf8ee9d1bad5d5ef66c906fe8a7acf8f5a69f6
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

23 lines
723 B
Plaintext

import type {CodeKeywordDefinition, AnySchema} from "../../types"
import type {KeywordCxt} from "../../compile/validate"
import {alwaysValidSchema} from "../../compile/util"
const def: CodeKeywordDefinition = {
keyword: "allOf",
schemaType: "array",
code(cxt: KeywordCxt) {
const {gen, schema, it} = cxt
/* istanbul ignore if */
if (!Array.isArray(schema)) throw new Error("ajv implementation error")
const valid = gen.name("valid")
schema.forEach((sch: AnySchema, i: number) => {
if (alwaysValidSchema(it, sch)) return
const schCxt = cxt.subschema({keyword: "allOf", schemaProp: i}, valid, true)
cxt.ok(valid)
cxt.mergeEvaluated(schCxt)
})
},
}
export default def