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

[Workers] Add Notes about Type Expections about Worker's Socket API #9118

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ await someResponse.body.pipeTo(writable);
- {{<code>}}write(chunk{{<param-type>}}any{{</param-type>}}){{</code>}} : {{<type>}}Promise\<void>{{</type>}}

- Writes a chunk of data to the writer and returns a promise that resolves if the operation succeeds.
- The underlying stream may accept fewer kinds of type than `any`, it will throw an exception when encountering an unexpected type.

{{</definitions>}}

Expand Down
1 change: 1 addition & 0 deletions content/workers/runtime-apis/tcp-sockets.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export default {

- {{<code>}}writable{{</code>}} : {{<type-link href="/workers/runtime-apis/streams/writablestream/">}}WritableStream{{</type-link>}}
- Returns the writable side of the TCP socket.
- The `WritableStream` returned only accepts chunks of `Uint8Array` or its views.

- `closed` {{<type>}}`Promise<void>`{{</type>}}
- This promise is resolved when the socket is closed and is rejected if the socket encounters an error.
Expand Down