Normally with Express, the router API looks like this:
router.post('/path/:param', (request, response) => {
const {params, body} = request;
// ...
});
The crosswalk equivalent looks like:
typedRouter.post('/path/:param', (params, body, request, response) => {
// ...
});
There's no reason crosswalk couldn't provide an equivalent of the express post that just takes request and response params but types their body & params properties. This might make migration simpler and would remove some awkwardness when you want the request param but don't have path params or a body.
Normally with Express, the router API looks like this:
The crosswalk equivalent looks like:
There's no reason crosswalk couldn't provide an equivalent of the express
postthat just takesrequestandresponseparams but types theirbody¶msproperties. This might make migration simpler and would remove some awkwardness when you want therequestparam but don't have path params or a body.