Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ce3f4c8

Browse filesBrowse files
TomStrepsiladuh95
authored andcommitted
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 PR-URL: #62566 Fixes: #62540 Reviewed-By: René <contact.9a5d6388@renegade334.me.uk> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 60a585e commit ce3f4c8
Copy full SHA for ce3f4c8

1 file changed

+11Lines changed: 11 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/webstreams.md‎

Copy file name to clipboardExpand all lines: doc/api/webstreams.md
+11Lines changed: 11 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1148,6 +1148,12 @@ await Promise.all([
11481148
11491149
<!-- YAML
11501150
added: v16.5.0
1151+
changes:
1152+
- version:
1153+
- v21.5.0
1154+
- v20.14.0
1155+
pr-url: https://github.com/nodejs/node/pull/50126
1156+
description: Supports the `cancel` transformer callback.
11511157
-->
11521158
11531159
* `transformer` {Object}
@@ -1166,6 +1172,11 @@ added: v16.5.0
11661172
the transformation process.
11671173
* `controller` {TransformStreamDefaultController}
11681174
* Returns: A promise fulfilled with `undefined`.
1175+
* `cancel` {Function} A user-defined function that is called when either the
1176+
readable side of the `TransformStream` is canceled or the writable side is
1177+
aborted.
1178+
* `reason` {any}
1179+
* Returns: A promise fulfilled with `undefined`.
11691180
* `readableType` {any} the `readableType` option is reserved for future use
11701181
and _must_ be `undefined`.
11711182
* `writableType` {any} the `writableType` option is reserved for future use

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.