Document TransformStream cleanup using "transformer.cancel"
- Dominant language
- Markdown
- Stars
- 11k
- Forks
- 23.2k
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 325
Description
The WHATWG Streams API was recently updated with a new hook for TransformStream cleanup. This allows cleaning up resources backing a transform stream when the stream is errored or aborted. Previously this sort of cleanup was only possible via the `flush` hook, which is only called when the readable stream naturally closes.
The spec PR can be found here: https://github.com/whatwg/streams/pull/1283
WPT: https://wpt.fyi/results/streams/transform-streams/cancel.any.html?label=master&label=experimental&aligned
Contributor guide
Research direction
Start by reviewing the TransformStream documentation and the linked WHATWG Streams specification PR and WPT result. Identify where transformer cleanup hooks are documented, then explain transformer.cancel for errored or aborted streams and how it differs from flush. Done means the MDN guidance reflects the updated API and its cleanup behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100