JS: support simple callbacks for setting up Express route handlers#3848
JS: support simple callbacks for setting up Express route handlers#3848erik-krogh wants to merge 4 commits intogithub:masterfrom
Conversation
esbena
left a comment
There was a problem hiding this comment.
Hmm. This seems a bit too ad hoc for my taste. And the wrapped candidate isn't really a route handler, is it? Its return/throw semantic has changed slightly (c.f. js/server-crash).
I wonder if type-tracking of req/res instead be convinced to go through such wrapper functions?
It can, and that is probably a better approach. I've implemented it in Doing the same thing for all calls is a bad idea, as our callgraph might blow up in e.g. |
|
An evaluation looks fine. I'll check out |
|
A rather large evaluation with I'll just close this PR for now because of the extremely limited impact. |
Inspired by this route handler. (Found using ATM)
I tried to see if I could find more route-handlers using this addition.
But so far I've not found anything other than the motivating-example.
TODO: