Repository navigation
feat(types): add Browser Run script binding methods - #8313
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
This pull request's reviews are posted as pull request reviews: see the review of |
|
clanky review |
There was a problem hiding this comment.
✅ Approved — This pull request only changes type declarations. The new types are well named and documented, the snapshots match the source, and I found no issues.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🔒 Security: ✅ LGTM
This pull request only adds type declarations, so it changes nothing at runtime that could affect security.
📖 AGENTS.md: ✅ LGTM
This change needs no AGENTS.md updates.
📋 Code Quality: ✅ LGTM
The new types follow the naming and typing rules for types/defines/. The generated snapshots match the source definitions.
⚡ Performance: ✅ LGTM
This change only adds type declarations and the regenerated snapshots, so it has no runtime or performance impact.
📝 Documentation: ✅ LGTM
The JSDoc for the new methods and option types is clear and consistent with the pull request description.
Reviewed commit: 8208280c
|
I have read the CLA Document and I hereby sign the CLA |
Adds
script()andscriptInSession()to theBrowserRunbinding types, withBrowserRunScriptOptions,BrowserRunScriptSessionOptions,BrowserRunScriptLibraryandBrowserRunScriptSuccessResponse.Both methods return a raw
Response:{ success: true, result }JSON body or the script's binary or non-JSON output.Response, not as a thrown error.script()also returns thecf-browser-session-idandcf-browser-target-idheaders, so the same session can be reused withscriptInSession().This is a types-only change: no runtime code changes. Snapshots were regenerated with
just generate-types.Docs: https://developers.cloudflare.com/browser-run/