honojs / hono

Web framework built on Web Standards
https://hono.dev
MIT License
20.38k stars 584 forks source link

perf(types): use homomorphic mapped type to reduce conditional branches #3440

Closed m-shaka closed 1 month ago

m-shaka commented 1 month ago

…anches

The author should do the following, if applicable

Reduced conditional branches by using homomorphic mapped type. The number of type instantiation has dropped a bit and the definition became simpler than before

FYI

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.77%. Comparing base (66df4e1) to head (57aa0d8). Report is 3 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #3440 +/- ## ======================================= Coverage 95.77% 95.77% ======================================= Files 155 155 Lines 9310 9310 Branches 2759 2773 +14 ======================================= Hits 8917 8917 Misses 393 393 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

yusukebe commented 1 month ago

@m-shaka

Good improvement. Thanks!