[whatwg/streams] Remove ReadableStreamBYOBReadResult (PR #1227)

<!--
Thank you for contributing to the Streams Standard! Please describe the change you are making and complete the checklist below if your change is not editorial.
-->

In https://github.com/whatwg/streams/pull/1214, ReadableStreamBYOBReadResult was changed to have a value property of type `(ArrayBufferView or undefined) value`, since it is possible for the value to be undefined.

However, the WebIDL specification says that is invalid IDL:

> undefined must not be used as the type of an argument in any circumstance (in
> an operation, callback function, constructor operation, etc), or as the type
> of a dictionary member, whether directly or in a union. Instead, use an
> optional argument or a non-required dictionary member.
>
-- https://webidl.spec.whatwg.org/#idl-undefined


So this commit instead removes ReadableStreamBYOBReadResult entirely, in favour of a renamed ReadableStreamDefaultReadResult, which has type `any` for its value.

- [ ] At least two implementers are interested (and none opposed):
   * …
   * …
- [ ] [Tests](https://github.com/web-platform-tests/wpt) are written and can be reviewed and commented upon at:
   * …
- [ ] [Implementation bugs](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) are filed:
   * Chrome: …
   * Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1752880

   * Safari: …
   * Deno: …
   * Node.js: …

(See [WHATWG Working Mode: Changes](https://whatwg.org/working-mode#changes) for more details.)

You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/streams/pull/1227


-- Commit Summary --

  * Remove ReadableStreamBYOBReadResult in favour of a renamed ReadableStreamReadResult

-- File Changes --

    M index.bs (27)
    D reference-implementation/lib/ReadableStreamBYOBReadResult.webidl (4)
    M reference-implementation/lib/ReadableStreamBYOBReader.webidl (2)
    D reference-implementation/lib/ReadableStreamDefaultReadResult.webidl (4)
    M reference-implementation/lib/ReadableStreamDefaultReader.webidl (2)
    A reference-implementation/lib/ReadableStreamReadResult.webidl (4)

-- Patch Links --

https://github.com/whatwg/streams/pull/1227.patch

https://github.com/whatwg/streams/pull/1227.diff


-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/1227

You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/streams/pull/1227@github.com>

Received on Tuesday, 12 April 2022 17:27:31 UTC