Skip to content

Commit ffa58ae

Browse files
committed
doc: document TransformStream transformer.cancel option
Add documentation for the `cancel` option of the `TransformStream` transformer, which allows users to specify a callback that will be called when the stream is canceled. See: https://streams.spec.whatwg.org/#transformer-api Fixes: #62540
1 parent 5ff1eab commit ffa58ae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/api/webstreams.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,10 @@ added: v16.5.0
11661166
the transformation process.
11671167
* `controller` {TransformStreamDefaultController}
11681168
* Returns: A promise fulfilled with `undefined`.
1169+
* `cancel` {Function} A user-defined function that is called when the
1170+
readable side of the `TransformStream` is canceled.
1171+
* `reason` {any}
1172+
* Returns: A promise fulfilled with `undefined`.
11691173
* `readableType` {any} the `readableType` option is reserved for future use
11701174
and _must_ be `undefined`.
11711175
* `writableType` {any} the `writableType` option is reserved for future use

0 commit comments

Comments
 (0)