* Connect a target operator as a dependent of source operators. * If necessary, this method will rerank the target operator and its * dependents to ensure propagation proceeds in a topologically sorted order. * @param {Operator} target - The target operator. * @param {Array } - The sour
(target, sources)
| 107694 | * @param {Array<Operator>} - The source operators that should propagate |
| 107695 | * to the target operator. |
| 107696 | */ function connect(target, sources) { |
| 107697 | const targetRank = target.rank, n = sources.length; |
| 107698 | for(let i = 0; i < n; ++i)if (targetRank < sources[i].rank) { |
| 107699 | this.rerank(target); |
| 107700 | return; |
| 107701 | } |
| 107702 | } |
| 107703 | let STREAM_ID = 0; |
| 107704 | /** |
| 107705 | * Models an event stream. |