Skip to content

Commit e5b9091

Browse files
committed
docs: clarify runMiddlewareChainIgnoringResults now merges standard Express properties
1 parent ee2e4c1 commit e5b9091

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/express-wrapper/src/middleware.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,14 +189,15 @@ export async function runMiddlewareChain<
189189
}
190190

191191
/**
192-
* Runs a middleware chain, but does not modify the decoded request (input) with properties from any middleware.
192+
* Runs a middleware chain and merges standard Express properties (body, query, params, headers) with the decoded request.
193+
* Does not incorporate other modifications middleware may make to the request object.
193194
* This primarily exists to preserve backwards-compatible behavior for RouteHandlers defined without the `routeHandler` function.
194195
*
195-
* @param input - the decoded request properties (just passed through)
196+
* @param _input - the decoded request properties (unused, decoded data is read from req)
196197
* @param chain - the middleware chain
197198
* @param req - express request object
198199
* @param res - express response object
199-
* @returns `input` unmodified
200+
* @returns decoded request merged with req.body, req.query, req.params, and req.headers
200201
*/
201202
export async function runMiddlewareChainIgnoringResults<
202203
Input,

0 commit comments

Comments
 (0)