Skip to content

fix(types): preserve response inference for Promise.then handlers#4767

Open
EdamAme-x wants to merge 6 commits intohonojs:mainfrom
EdamAme-x:fix/rpc-promise-then-inference
Open

fix(types): preserve response inference for Promise.then handlers#4767
EdamAme-x wants to merge 6 commits intohonojs:mainfrom
EdamAme-x:fix/rpc-promise-then-inference

Conversation

@EdamAme-x
Copy link
Contributor

@EdamAme-x EdamAme-x commented Feb 24, 2026

Close: #4765

The author should do the following, if applicable

  • Add tests
  • Run tests
  • bun run format:fix && bun run lint:fix to format the code

@EdamAme-x EdamAme-x marked this pull request as draft February 24, 2026 15:26
@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.48%. Comparing base (2de30d7) to head (0ebd771).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4767      +/-   ##
==========================================
- Coverage   91.48%   91.48%   -0.01%     
==========================================
  Files         177      177              
  Lines       11556    11551       -5     
  Branches     3357     3354       -3     
==========================================
- Hits        10572    10567       -5     
  Misses        983      983              
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@EdamAme-x
Copy link
Contributor Author

EdamAme-x commented Feb 24, 2026

The implementation itself works with this, but it will result in a large diff if we try to fix all patterns (app.|any|(handler x |any|))

@EdamAme-x EdamAme-x marked this pull request as ready for review February 24, 2026 17:31
@valerii15298
Copy link

I don't know specifics here but curious if Awaited would have been helpful https://www.typescriptlang.org/docs/handbook/utility-types.html#awaitedtype

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: RPC types broken when using arrow function with a Promise

2 participants