.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / table / node_modules / ajv / lib / vocabularies / applicator / thenElse.ts
diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/table/node_modules/ajv/lib/vocabularies/applicator/thenElse.ts b/.config/coc/extensions/node_modules/coc-prettier/node_modules/table/node_modules/ajv/lib/vocabularies/applicator/thenElse.ts
new file mode 100644 (file)
index 0000000..5055182
--- /dev/null
@@ -0,0 +1,13 @@
+import type {CodeKeywordDefinition} from "../../types"
+import type {KeywordCxt} from "../../compile/validate"
+import {checkStrictMode} from "../../compile/util"
+
+const def: CodeKeywordDefinition = {
+  keyword: ["then", "else"],
+  schemaType: ["object", "boolean"],
+  code({keyword, parentSchema, it}: KeywordCxt) {
+    if (parentSchema.if === undefined) checkStrictMode(it, `"${keyword}" without "if" is ignored`)
+  },
+}
+
+export default def