(gen, keyword, result)
| 3376 | throw new Error("async keyword in sync schema"); |
| 3377 | } |
| 3378 | function useKeyword(gen, keyword, result) { |
| 3379 | if (result === undefined) |
| 3380 | throw new Error(`keyword "${keyword}" failed to compile`); |
| 3381 | return gen.scopeValue("keyword", typeof result == "function" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) }); |
| 3382 | } |
| 3383 | function validSchemaType(schema, schemaType, allowUndefined = false) { |
| 3384 | // TODO add tests |
| 3385 | return (!schemaType.length || |
no test coverage detected