Skip to content
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

Editorial: align .webidl files with WebIDL from spec text #1192

Merged
merged 1 commit into from
Dec 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1150,8 +1150,8 @@ interface ReadableStreamDefaultReader {
ReadableStreamDefaultReader includes ReadableStreamGenericReader;

dictionary ReadableStreamDefaultReadResult {
any value;
boolean done;
any value;
boolean done;
};
</xmp>

Expand Down Expand Up @@ -1294,8 +1294,8 @@ interface ReadableStreamBYOBReader {
ReadableStreamBYOBReader includes ReadableStreamGenericReader;

dictionary ReadableStreamBYOBReadResult {
ArrayBufferView value;
boolean done;
ArrayBufferView value;
boolean done;
};
</xmp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ interface ReadableByteStreamController {
readonly attribute ReadableStreamBYOBRequest? byobRequest;
readonly attribute unrestricted double? desiredSize;

void close();
void enqueue(ArrayBufferView chunk);
void error(optional any e);
undefined close();
undefined enqueue(ArrayBufferView chunk);
undefined error(optional any e);
};
6 changes: 3 additions & 3 deletions reference-implementation/lib/ReadableStream.webidl
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[Exposed=(Window,Worker,Worklet)]
[Exposed=(Window,Worker,Worklet), Transferable]
interface ReadableStream {
constructor(optional object underlyingSource, optional QueuingStrategy strategy = {});

readonly attribute boolean locked;

Promise<void> cancel(optional any reason);
Promise<undefined> cancel(optional any reason);
ReadableStreamReader getReader(optional ReadableStreamGetReaderOptions options = {});
ReadableStream pipeThrough(ReadableWritablePair transform, optional StreamPipeOptions options = {});
Promise<void> pipeTo(WritableStream destination, optional StreamPipeOptions options = {});
Promise<undefined> pipeTo(WritableStream destination, optional StreamPipeOptions options = {});
sequence<ReadableStream> tee();

[WebIDL2JSHasReturnSteps] async iterable<any>(optional ReadableStreamIteratorOptions options = {});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ interface ReadableStreamBYOBReader {
constructor(ReadableStream stream);

Promise<ReadableStreamBYOBReadResult> read(ArrayBufferView view);
void releaseLock();
undefined releaseLock();
};
ReadableStreamBYOBReader includes ReadableStreamGenericReader;
4 changes: 2 additions & 2 deletions reference-implementation/lib/ReadableStreamBYOBRequest.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
interface ReadableStreamBYOBRequest {
readonly attribute ArrayBufferView? view;

void respond([EnforceRange] unsigned long long bytesWritten);
void respondWithNewView(ArrayBufferView view);
undefined respond([EnforceRange] unsigned long long bytesWritten);
undefined respondWithNewView(ArrayBufferView view);
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
interface ReadableStreamDefaultController {
readonly attribute unrestricted double? desiredSize;

void close();
void enqueue(optional any chunk);
void error(optional any e);
undefined close();
undefined enqueue(optional any chunk);
undefined error(optional any e);
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ interface ReadableStreamDefaultReader {
constructor(ReadableStream stream);

Promise<ReadableStreamDefaultReadResult> read();
void releaseLock();
undefined releaseLock();
};
ReadableStreamDefaultReader includes ReadableStreamGenericReader;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
interface mixin ReadableStreamGenericReader {
readonly attribute Promise<void> closed;
readonly attribute Promise<undefined> closed;

Promise<void> cancel(optional any reason);
Promise<undefined> cancel(optional any reason);
};
2 changes: 1 addition & 1 deletion reference-implementation/lib/TransformStream.webidl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Exposed=(Window,Worker,Worklet)]
[Exposed=(Window,Worker,Worklet), Transferable]
interface TransformStream {
constructor(optional object transformer,
optional QueuingStrategy writableStrategy = {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
interface TransformStreamDefaultController {
readonly attribute unrestricted double? desiredSize;

void enqueue(optional any chunk);
void error(optional any reason);
void terminate();
undefined enqueue(optional any chunk);
undefined error(optional any reason);
undefined terminate();
};
4 changes: 2 additions & 2 deletions reference-implementation/lib/Transformer.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ dictionary Transformer {
};

callback TransformerStartCallback = any (TransformStreamDefaultController controller);
callback TransformerFlushCallback = Promise<void> (TransformStreamDefaultController controller);
callback TransformerTransformCallback = Promise<void> (any chunk, TransformStreamDefaultController controller);
callback TransformerFlushCallback = Promise<undefined> (TransformStreamDefaultController controller);
callback TransformerTransformCallback = Promise<undefined> (any chunk, TransformStreamDefaultController controller);
6 changes: 3 additions & 3 deletions reference-implementation/lib/UnderlyingSink.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ dictionary UnderlyingSink {
};

callback UnderlyingSinkStartCallback = any (WritableStreamDefaultController controller);
callback UnderlyingSinkWriteCallback = Promise<void> (any chunk, WritableStreamDefaultController controller);
callback UnderlyingSinkCloseCallback = Promise<void> ();
callback UnderlyingSinkAbortCallback = Promise<void> (optional any reason);
callback UnderlyingSinkWriteCallback = Promise<undefined> (any chunk, WritableStreamDefaultController controller);
callback UnderlyingSinkCloseCallback = Promise<undefined> ();
callback UnderlyingSinkAbortCallback = Promise<undefined> (optional any reason);
4 changes: 2 additions & 2 deletions reference-implementation/lib/UnderlyingSource.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dictionary UnderlyingSource {
typedef (ReadableStreamDefaultController or ReadableByteStreamController) ReadableStreamController;

callback UnderlyingSourceStartCallback = any (ReadableStreamController controller);
callback UnderlyingSourcePullCallback = Promise<void> (ReadableStreamController controller);
callback UnderlyingSourceCancelCallback = Promise<void> (optional any reason);
callback UnderlyingSourcePullCallback = Promise<undefined> (ReadableStreamController controller);
callback UnderlyingSourceCancelCallback = Promise<undefined> (optional any reason);

enum ReadableStreamType { "bytes" };
6 changes: 3 additions & 3 deletions reference-implementation/lib/WritableStream.webidl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[Exposed=(Window,Worker,Worklet)]
[Exposed=(Window,Worker,Worklet), Transferable]
interface WritableStream {
constructor(optional object underlyingSink, optional QueuingStrategy strategy = {});

readonly attribute boolean locked;

Promise<void> abort(optional any reason);
Promise<void> close();
Promise<undefined> abort(optional any reason);
Promise<undefined> close();
WritableStreamDefaultWriter getWriter();
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Exposed=(Window,Worker,Worklet)]
interface WritableStreamDefaultController {
readonly attribute AbortSignal signal;
void error(optional any e);
undefined error(optional any e);
};
12 changes: 6 additions & 6 deletions reference-implementation/lib/WritableStreamDefaultWriter.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
interface WritableStreamDefaultWriter {
constructor(WritableStream stream);

readonly attribute Promise<void> closed;
readonly attribute Promise<undefined> closed;
readonly attribute unrestricted double? desiredSize;
readonly attribute Promise<void> ready;
readonly attribute Promise<undefined> ready;

Promise<void> abort(optional any reason);
Promise<void> close();
void releaseLock();
Promise<void> write(optional any chunk);
Promise<undefined> abort(optional any reason);
Promise<undefined> close();
undefined releaseLock();
Promise<undefined> write(optional any chunk);
};