fix(docs): Update Sandbox Env interface to specify Sandbox type#28443
fix(docs): Update Sandbox Env interface to specify Sandbox type#28443OpeOginni wants to merge 2 commits intocloudflare:productionfrom
Conversation
Solution to issue brought up in cloudflare/sandbox-sdk#397
|
/bonk review this change |
There was a problem hiding this comment.
Thanks for the fix — the core change (adding the Sandbox type parameter and re-export) is correct and aligns with the pattern used across other Sandbox docs. A few things to address before merging:
- Inconsistent indentation — the changed line uses spaces but the surrounding code uses tabs.
- Inconsistent quote style — the new
exportline uses single quotes while the adjacentimportuses double quotes. - Same bug exists in the bucket mounting example further down in this same file (line 284) — it would be good to fix both in one PR.
src/content/docs/sandbox/configuration/environment-variables.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/sandbox/configuration/environment-variables.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/sandbox/configuration/environment-variables.mdx
Outdated
Show resolved
Hide resolved
|
Review submitted. Here's a summary of my feedback on PR #28443: The fix is correct — adding Three items to address:
|
|
Fixed Mr Bonk |
Summary
Solution to issue brought up in cloudflare/sandbox-sdk#397
In the Docs on https://developers.cloudflare.com/sandbox/configuration/environment-variables/#pass-worker-secrets-to-sandbox we are shown how to be able to have access to envs from the Env interface, but using that code directly has some type errors.
Following the example given in the Tutorial for persistent storage https://developers.cloudflare.com/sandbox/tutorials/persistent-storage/#3-build-the-data-processor which is correct.
Documentation checklist