lambda-api icon indicating copy to clipboard operation
lambda-api copied to clipboard

Fix Typing for Use Function

Open michaeleliot opened this issue 4 years ago • 0 comments
trafficstars

Currently the use function allows for inputs to be either Middleware or ErrorHandlingMiddleware. However, the typescript type requires the list of arguments to be only Middleware or only ErrorHandlingMiddleware. I.e. you couldn't call api.use with both error middleware and normal middleware. This pr brings the typescript type back into line with code expectation.

Code Section in question: https://github.com/jeremydaly/lambda-api/blob/c1fe83e53d56eb23c4ef755c01bf1ebc07a7c342/index.js#L355-L383

michaeleliot avatar Jun 03 '21 20:06 michaeleliot