Last change
on this file since 188ee53 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
441 bytes
|
Line | |
---|
1 | import type {CodeKeywordDefinition} from "../../types"
|
---|
2 | import type {KeywordCxt} from "../../compile/validate"
|
---|
3 | import {checkStrictMode} from "../../compile/util"
|
---|
4 |
|
---|
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`)
|
---|
10 | },
|
---|
11 | }
|
---|
12 |
|
---|
13 | export default def
|
---|
Note:
See
TracBrowser
for help on using the repository browser.