1 import type {CodeKeywordDefinition} from "../../types"
2 import type {KeywordCxt} from "../../compile/validate"
3 import {checkStrictMode} from "../../compile/util"
5 const def: CodeKeywordDefinition = {
6 keyword: ["then", "else"],
7 schemaType: ["object", "boolean"],
8 code({keyword, parentSchema, it}: KeywordCxt) {
9 if (parentSchema.if === undefined) checkStrictMode(it, `"${keyword}" without "if" is ignored`)