You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					14 lines
				
				441 B
			
		
		
			
		
	
	
					14 lines
				
				441 B
			| 
											3 years ago
										 | 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 |