* Returns the next operation object and advances the iterator. * * Note: This does NOT implement the ECMAScript iterator protocol. * * @param {Op} [opOut] - Deprecated. Operation object to recycle for the return value. * @returns {Op} The next operation, or an operation with a falsy `
(opOut: Op = new Op())
| 36 | * no more operations. |
| 37 | */ |
| 38 | next(opOut: Op = new Op()): Op { |
| 39 | if (this.hasNext()) { |
| 40 | copyOp(this._next.value!, opOut); |
| 41 | this._next = this.gen.next(); |
| 42 | } else { |
| 43 | clearOp(opOut); |
| 44 | } |
| 45 | return opOut; |
| 46 | } |
| 47 | } |
no test coverage detected