(id: string, args: Variable[], outputs: Variable[], branches: IfBranch[], hasAggregate = false)
| 588 | proposalObject: Proposal; |
| 589 | |
| 590 | constructor(id: string, args: Variable[], outputs: Variable[], branches: IfBranch[], hasAggregate = false) { |
| 591 | this.id = id; |
| 592 | this.branches = branches; |
| 593 | this.outputs = outputs; |
| 594 | this.hasAggregate = hasAggregate; |
| 595 | this.resolved = []; |
| 596 | this.resolvedOutputs = []; |
| 597 | this.hasResolvedOutputs = false; |
| 598 | let blockVars = []; |
| 599 | this.vars = args.slice(); |
| 600 | for(let branch of branches) { |
| 601 | if(branch.exclusive) this.exclusive = true; |
| 602 | } |
| 603 | for(let output of outputs) { |
| 604 | if(output !== undefined && isVariable(output)) { |
| 605 | this.vars[output.id] = output; |
| 606 | blockVars[output.id] = output; |
| 607 | } |
| 608 | } |
| 609 | for(let arg of args) { |
| 610 | if(isVariable(arg)) { |
| 611 | blockVars[arg.id] = arg; |
| 612 | } |
| 613 | } |
| 614 | this.args = args; |
| 615 | this.internalVars = blockVars; |
| 616 | this.proposalObject = {providing: null, index: null, cardinality: 0}; |
| 617 | } |
| 618 | |
| 619 | resolve(prefix) { |
| 620 | return resolve(this.args, prefix, this.resolved); |
nothing calls this directly
no test coverage detected