Skip to content

Commit

Permalink
Merge pull request #102 from MattiasBuelens/deprecate-wc-abort-reason
Browse files Browse the repository at this point in the history
Deprecate WritableStreamDefaultController.abortReason
  • Loading branch information
MattiasBuelens authored Nov 6, 2021
2 parents bafe11b + afc34b3 commit 1555788
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@
> - 👓 Spec Compliance
> - 🚀 New Feature
> - 🐛 Bug Fix
> - 👎 Deprecation
> - 📝 Documentation
> - 🏠 Internal
> - 💅 Polish
## Unreleased

* 👎 Deprecate `WritableStreamDefaultController.abortReason` ([#102](https://github.com/MattiasBuelens/web-streams-polyfill/pull/102))
* Use `WritableStreamDefaultController.signal.reason` instead.
* 👓 Align with [spec version `4b6b93c`](https://github.com/whatwg/streams/tree/4b6b93c69e531e2fe45a6ed4cb1484a7ba4eb8bb/) ([#103](https://github.com/MattiasBuelens/web-streams-polyfill/pull/103))

## v3.1.1 (2021-09-06)
Expand Down
1 change: 1 addition & 0 deletions etc/web-streams-polyfill.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ export class WritableStream<W = any> {

// @public
export class WritableStreamDefaultController<W = any> {
// @deprecated
get abortReason(): any;
error(e?: any): void;
get signal(): AbortSignal;
Expand Down
4 changes: 4 additions & 0 deletions src/lib/writable-stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,10 @@ export class WritableStreamDefaultController<W = any> {

/**
* The reason which was passed to `WritableStream.abort(reason)` when the stream was aborted.
*
* @deprecated
* This property has been removed from the specification, see https://github.com/whatwg/streams/pull/1177.
* Use {@link WritableStreamDefaultController.signal}'s `reason` instead.
*/
get abortReason(): any {
if (!IsWritableStreamDefaultController(this)) {
Expand Down

0 comments on commit 1555788

Please sign in to comment.