GeezerVison is showing github.com — doc: document TransformStream transformer.cancel option · nodejs/node@ce3f4c8
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
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 number | Diff line number | Diff line change |
|---|
@@ -1148,6 +1148,12 @@ await Promise.all([ |
1148 | 1148 |
|
1149 | 1149 | <!-- YAML |
1150 | 1150 | 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. |
1151 | 1157 | --> |
1152 | 1158 |
|
1153 | 1159 | * `transformer` {Object} |
@@ -1166,6 +1172,11 @@ added: v16.5.0 |
1166 | 1172 | the transformation process. |
1167 | 1173 | * `controller` {TransformStreamDefaultController} |
1168 | 1174 | * 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`. |
1169 | 1180 | * `readableType` {any} the `readableType` option is reserved for future use |
1170 | 1181 | and _must_ be `undefined`. |
1171 | 1182 | * `writableType` {any} the `writableType` option is reserved for future use |
|