Skip to content

Conversation

@vicb
Copy link
Contributor

@vicb vicb commented Jun 26, 2025

Summary

Use both TS and JS for snippets

fixes #23214

/cc @ranbel

I have updated all the snippets introduced in #17905 and a few other places. I'll create a separate issue to convert the (many) remaining pages where we could use <TypescriptExample>.

Screenshots (optional)

Documentation checklist

@github-actions github-actions bot added product:ai-gateway AI Gateway: https://developers.cloudflare.com/ai-gateway/ product:AutoRAG product:bots Related to Bots product product:browser-rendering product:cloudflare-one product:cloudflare-for-platforms product:durable-objects Durable Objects: https://developers.cloudflare.com/workers/learning/using-durable-objects/ product:images Related to Image Resizing product labels Jun 26, 2025
@hyperlint-ai
Copy link
Contributor

hyperlint-ai bot commented Jun 26, 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

Enhanced documentation by incorporating TypeScript examples alongside existing JavaScript snippets.

  • Introduced TypeScript examples in various documentation sections to support both TS and JS snippets.
  • Updated imports to include TypeScriptExample component where necessary.
  • Ensured adherence to the documentation style guide throughout the changes.

Modified Files

  • src/content/docs/agents/api-reference/agents-api.mdx
  • src/content/docs/ai-gateway/providers/workersai.mdx
  • src/content/docs/autorag/how-to/bring-your-own-generation-model.mdx
  • src/content/docs/autorag/how-to/simple-search-engine.mdx
  • src/content/docs/autorag/tutorial/brower-rendering-autorag-tutorial.mdx
  • src/content/docs/bots/workers-templates/delay-action.mdx
  • src/content/docs/browser-rendering/platform/puppeteer.mdx
  • src/content/docs/browser-rendering/workers-bindings/reuse-sessions.mdx
  • src/content/docs/cloudflare-for-platforms/cloudflare-for-saas/domain-support/custom-metadata.mdx
  • src/content/docs/cloudflare-one/tutorials/access-workers.mdx
  • src/content/docs/durable-objects/get-started.mdx
  • src/content/docs/images/manage-images/serve-images/serve-private-images.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.

@github-actions
Copy link
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/agents/ @irvinebroque, @rita3ko, @elithrar, @thomasgauvin, @threepointone, @cloudflare/pcx-technical-writing
/src/content/docs/ai-gateway/ @kathayl, @mchenco, @kodster28, @cloudflare/pcx-technical-writing
/src/content/docs/autorag/ @rita3ko, @irvinebroque, @aninibread, @ToriLindsay, @cloudflare/pcx-technical-writing
/src/content/docs/bots/ @patriciasantaana, @cloudflare/pcx-technical-writing
/src/content/docs/browser-rendering/ @mchenco, @cloudflare/pcx-technical-writing, @celso, @danielgek, @kathayl, @ToriLindsay
/src/content/docs/cloudflare-for-platforms/cloudflare-for-saas/ @RebeccaTamachiro, @cloudflare/pcx-technical-writing
/src/content/docs/cloudflare-one/ @ranbel, @cloudflare/pcx-technical-writing
/src/content/docs/durable-objects/ @elithrar, @vy-ton, @joshthoward, @oxyjun, @harshil1712, @mikenomitch, @cloudflare/pcx-technical-writing, @cloudflare/workers-runtime-1
/src/content/docs/images/ @ToriLindsay, @cloudflare/pcx-technical-writing, @renandincer, @third774

@github-actions
Copy link
Contributor

Preview URL: https://45bd766f.preview.developers.cloudflare.com
Preview Branch URL: https://vicb-ts-js.preview.developers.cloudflare.com

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/browser-rendering/platform/puppeteer/ https://vicb-ts-js.preview.developers.cloudflare.com/browser-rendering/platform/puppeteer/
https://developers.cloudflare.com/bots/workers-templates/delay-action/ https://vicb-ts-js.preview.developers.cloudflare.com/bots/workers-templates/delay-action/
https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/domain-support/custom-metadata/ https://vicb-ts-js.preview.developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/domain-support/custom-metadata/
https://developers.cloudflare.com/cloudflare-one/tutorials/access-workers/ https://vicb-ts-js.preview.developers.cloudflare.com/cloudflare-one/tutorials/access-workers/
https://developers.cloudflare.com/images/manage-images/serve-images/serve-private-images/ https://vicb-ts-js.preview.developers.cloudflare.com/images/manage-images/serve-images/serve-private-images/
https://developers.cloudflare.com/agents/api-reference/agents-api/ https://vicb-ts-js.preview.developers.cloudflare.com/agents/api-reference/agents-api/
https://developers.cloudflare.com/ai-gateway/providers/workersai/ https://vicb-ts-js.preview.developers.cloudflare.com/ai-gateway/providers/workersai/
https://developers.cloudflare.com/autorag/how-to/simple-search-engine/ https://vicb-ts-js.preview.developers.cloudflare.com/autorag/how-to/simple-search-engine/
https://developers.cloudflare.com/autorag/tutorial/brower-rendering-autorag-tutorial/ https://vicb-ts-js.preview.developers.cloudflare.com/autorag/tutorial/brower-rendering-autorag-tutorial/
https://developers.cloudflare.com/browser-rendering/workers-bindings/reuse-sessions/ https://vicb-ts-js.preview.developers.cloudflare.com/browser-rendering/workers-bindings/reuse-sessions/
https://developers.cloudflare.com/autorag/how-to/bring-your-own-generation-model/ https://vicb-ts-js.preview.developers.cloudflare.com/autorag/how-to/bring-your-own-generation-model/
https://developers.cloudflare.com/durable-objects/get-started/ https://vicb-ts-js.preview.developers.cloudflare.com/durable-objects/get-started/

@vicb vicb merged commit a945a1e into production Jun 26, 2025
12 checks passed
@vicb vicb deleted the vicb/ts-js branch June 26, 2025 18:44
@vicb
Copy link
Contributor Author

vicb commented Jun 26, 2025

Thanks for the review @ranbel !

sdnts pushed a commit to sdnts/cloudflare-docs that referenced this pull request Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. product:ai-gateway AI Gateway: https://developers.cloudflare.com/ai-gateway/ product:AutoRAG product:bots Related to Bots product product:browser-rendering product:cloudflare-for-platforms product:cloudflare-one product:durable-objects Durable Objects: https://developers.cloudflare.com/workers/learning/using-durable-objects/ product:images Related to Image Resizing product size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Example page for access header worker has invalid syntax