(destination, rawOptions = {})
| 14004 | return transform.readable; |
| 14005 | } |
| 14006 | pipeTo(destination, rawOptions = {}) { |
| 14007 | if (!IsReadableStream(this)) { |
| 14008 | return promiseRejectedWith(streamBrandCheckException$1("pipeTo")); |
| 14009 | } |
| 14010 | if (destination === void 0) { |
| 14011 | return promiseRejectedWith(`Parameter 1 is required in 'pipeTo'.`); |
| 14012 | } |
| 14013 | if (!IsWritableStream(destination)) { |
| 14014 | return promiseRejectedWith(new TypeError(`ReadableStream.prototype.pipeTo's first argument must be a WritableStream`)); |
| 14015 | } |
| 14016 | let options; |
| 14017 | try { |
| 14018 | options = convertPipeOptions(rawOptions, "Second parameter"); |
| 14019 | } catch (e3) { |
| 14020 | return promiseRejectedWith(e3); |
| 14021 | } |
| 14022 | if (IsReadableStreamLocked(this)) { |
| 14023 | return promiseRejectedWith(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")); |
| 14024 | } |
| 14025 | if (IsWritableStreamLocked(destination)) { |
| 14026 | return promiseRejectedWith(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")); |
| 14027 | } |
| 14028 | return ReadableStreamPipeTo(this, destination, options.preventClose, options.preventAbort, options.preventCancel, options.signal); |
| 14029 | } |
| 14030 | /** |
| 14031 | * Tees this readable stream, returning a two-element array containing the two resulting branches as |
| 14032 | * new {@link ReadableStream} instances. |
nothing calls this directly
no test coverage detected