()
| 596 | const isTransformErrors = () => |
| 597 | `typeof ${name} === "function" && ${name} instanceof ${this.ref(TransformErrors)}` |
| 598 | const assignSteps = () => { |
| 599 | const errN = `${name}ErrorCount` |
| 600 | if (nodes.slice(0, -1).some(node => node.tfCtx)) |
| 601 | this.const(errN, `${this.ctx}.errN`) |
| 602 | for (let i = 0; i < steps.length; i++) { |
| 603 | const { node, signature, indexed } = steps[i] |
| 604 | const previous = nodes.slice(0, i) |
| 605 | const conditions = indexed && opts?.ownKey ? [opts.ownKey] : [] |
| 606 | if (signature) { |
| 607 | conditions.push( |
| 608 | this.inv(signature, { arg: keyExpr!, kind: "Allows" }) |
| 609 | ) |
| 610 | } |
| 611 | if (previous.some(returnsTransformErrors)) |
| 612 | conditions.push(`!(${isTransformErrors()})`) |
| 613 | if (previous.some(node => node.tfCtx)) |
| 614 | conditions.push(`${this.ctx}.errN === ${errN}`) |
| 615 | const assignStep = () => assign(name, node, i === 0 ? input : name) |
| 616 | if (conditions.length) this.if(conditions.join(" && "), assignStep) |
| 617 | else assignStep() |
| 618 | } |
| 619 | return this |
| 620 | } |
| 621 | if ( |
| 622 | steps.length === 1 && |
| 623 | !steps[0].signature && |
no test coverage detected