(...args)
| 121 | } |
| 122 | |
| 123 | push(...args) { |
| 124 | const { transforms, options } = parsePullArgs(args); |
| 125 | const rawConsumer = this.#createRawConsumer(); |
| 126 | |
| 127 | // When transforms are present, delegate to pull() which creates its |
| 128 | // own internal AbortController that follows the external signal. |
| 129 | // When no transforms, return rawConsumer directly (controller elided |
| 130 | // per PULL-02 optimization -- no transforms means no signal recipient). |
| 131 | if (transforms.length > 0) { |
| 132 | const pullArgs = [...transforms]; |
| 133 | if (options?.signal) { |
| 134 | ArrayPrototypePush(pullArgs, |
| 135 | { __proto__: null, signal: options.signal }); |
| 136 | } |
| 137 | return pullWithTransforms(rawConsumer, ...pullArgs); |
| 138 | } |
| 139 | return rawConsumer; |
| 140 | } |
| 141 | |
| 142 | #createRawConsumer() { |
| 143 | const state = { |
no test coverage detected