Skip to content

Conversation

@sambostock
Copy link

Summary

Instead of extracting values and destructuring them positionally, we can destructure by key, which is both shorter and clearer about what's going on.

Documentation checklist

@hyperlint-ai
Copy link
Contributor

hyperlint-ai bot commented May 7, 2025

Howdy and thanks for contributing to our repo. The Cloudflare team reviews new, external PRs within two (2) weeks. If it's been two weeks or longer without any movement, please tag the PR Assignees in a comment.

We review internal PRs within 1 week. If it's something urgent or has been sitting without a comment, start a thread in the Developer Docs space internally.


PR Change Summary

Simplified the websocket destructuring example for clarity and brevity.

  • Revised the websocket destructuring example to use key-based destructuring instead of positional destructuring.
  • Enhanced clarity in the documentation regarding the WebSocketPair object.
  • Ensured adherence to the documentation style guide.

Modified Files

  • src/content/docs/workers/runtime-apis/websockets.mdx

How can I customize these reviews?

Check out the Hyperlint AI Reviewer docs for more information on how to customize the review.

If you just want to ignore it on this PR, you can add the hyperlint-ignore label to the PR. Future changes won't trigger a Hyperlint review.

Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add hyperlint-ignore to the PR to ignore the link check for this PR.

Instead of extracting values and destructuring them positionally, we can
destructure by key, which is both shorter and clearer about what's going
on.
@kodster28
Copy link
Collaborator

Howdy @sambostock, asked around internally and we're fine with the example as is.

Thanks for the suggestion though!

@kodster28 kodster28 closed this May 28, 2025
@sambostock sambostock deleted the destructuring branch May 28, 2025 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:workers Related to Workers product size/xs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants