-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve the ergonomics of Endpoint#implement
#2811
Labels
Comments
/bounty $100 |
💎 $100 bounty • ZIOSteps to solve:
Thank you for contributing to zio/zio-http! Add a bounty • Share on socials
|
987Nabil
added a commit
to 987Nabil/zio-http
that referenced
this issue
Jun 7, 2024
987Nabil
added a commit
to 987Nabil/zio-http
that referenced
this issue
Jun 7, 2024
💡 @987Nabil submitted a pull request that claims the bounty. You can visit your bounty board to reward. |
987Nabil
added a commit
to 987Nabil/zio-http
that referenced
this issue
Jun 7, 2024
987Nabil
added a commit
to 987Nabil/zio-http
that referenced
this issue
Jun 7, 2024
987Nabil
added a commit
to 987Nabil/zio-http
that referenced
this issue
Jun 7, 2024
987Nabil
added a commit
to 987Nabil/zio-http
that referenced
this issue
Jun 7, 2024
987Nabil
added a commit
to 987Nabil/zio-http
that referenced
this issue
Jun 7, 2024
jdegoes
added a commit
that referenced
this issue
Jun 9, 2024
Co-authored-by: John A. De Goes <john@degoes.net>
🎉🎈 @987Nabil has been awarded $100! 🎈🎊 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently,
implement
must be passed ahandler
, which itself requires a function whose input matches the input of the endpoint. It's also necessary to manually ascribe a type to the handler's input parameter.In ZIO land, we don't love manually ascribing types when they can be inferred from the context. Ideally, one could write the following:
As the Endpoint already knows its own input type, it can constrain the provided function to be of the right type. The user's IDE will know exactly what input is required, rather than forcing the user to provide a handler with a logically redundant + manual type ascription. Further, it would be great if
implement
built thehandler
internally, as it's just extra syntactic noise.The text was updated successfully, but these errors were encountered: