New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
web-sys: Added [Throws] attributes to Streams API #3052
Conversation
constructor(optional object underlyingSource, optional QueuingStrategy strategy = {}); | ||
[Throws] constructor(optional object underlyingSource, optional QueuingStrategy strategy = {}); | ||
|
||
readonly attribute boolean locked; | ||
|
||
Promise<undefined> cancel(optional any reason); | ||
ReadableStreamReader getReader(optional ReadableStreamGetReaderOptions options = {}); | ||
ReadableStream pipeThrough(ReadableWritablePair transform, optional StreamPipeOptions options = {}); | ||
[Throws] ReadableStreamReader getReader(optional ReadableStreamGetReaderOptions options = {}); | ||
[Throws] ReadableStream pipeThrough(ReadableWritablePair transform, optional StreamPipeOptions options = {}); | ||
Promise<undefined> pipeTo(WritableStream destination, optional StreamPipeOptions options = {}); | ||
sequence<ReadableStream> tee(); | ||
[Throws] sequence<ReadableStream> tee(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although this is correct, it's a breaking change, since ReadableStream
is already stable with methods which don't return Result
. So, I think we'll have to leave these as being incorrectly infallible.
This isn't a problem for the other types because they were all previously unstable.
Thanks for catching this @Liamolucko and helping to fix it @rozbb! If you're up for it @rozbb one thing that might be helpful is to land a revert of the stream changes and then have a second PR which re-applies it with the |
Sounds good! Will do
|
Done! Latest two PRs should resolve this. |
@rozbb can you also update this PR? There are merge conflicts
I assume this PR is still needed in addition to those, right? |
No, it isn't - #3065 included all the changes from this PR. |
Following the comment in #3046 (comment), I went through
Streams.webidl
and added a[Throws]
attribute on every method and member that Mozilla places a[Throws]
attribute on.cc @Liamolucko