(js: NodeCompiler)
| 423 | |
| 424 | // minLength/maxLength compilation should be handled by Intersection |
| 425 | compile(js: NodeCompiler): void { |
| 426 | if (js.trav === "Transform") return this.jsTf(js) |
| 427 | // like Structure, bail out of subsequent elements in fail-fast mode |
| 428 | // (e.g. inside a union branch) so we don't traverse an element whose |
| 429 | // basis has already failed - see |
| 430 | // https://github.com/arktypeio/arktype/issues/1458 |
| 431 | this.jsElements(js, (keyExpr, node) => |
| 432 | js.travKey(keyExpr, `data[${keyExpr}]`, node) |
| 433 | ) |
| 434 | |
| 435 | js.return(true) |
| 436 | } |
| 437 | |
| 438 | private jsTf(js: NodeCompiler): void { |
| 439 | js.initTf(this.children).let("out", "data") |
nothing calls this directly
no test coverage detected