feat(function): type page, url, and headers on function args - #62
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe PR updates function type declarations in the core and function packages. It exports argument types with page, response, headers, and URL properties, adds a string-code overload, and extends type-level tests. ChangesFunction type contracts
Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Coverage Report for CI Build 35193824725Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Warning No base build found for commit Coverage: 80.387%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
Summary
FunctionArgsas{ page, response, headers, url }using Puppeteer'sPageandHTTPResponsemicrolink.function()so inline callbacks getpage.completions in editorsFunctionArgs/FunctionInputfrommicrolink.ioand@microlink/functionTest plan
pnpm exec tsdinpackages/coreandpackages/function({ page, url }) => page.title()type-checkspageasPageandurlasstringfunction(url, '() => 1')still type-checksMade with Cursor
Summary by CodeRabbit
FunctionArgstype makes these executor inputs easier to use in TypeScript.client.functionnow supports submitting code as a string through a dedicated overload.user-agentand the current URL.