Closed jtanadi closed 4 years ago
Hi @jtanadi thanks for using restana and contributing to make it better. Totally valid suggestions. I will update and release ASAP.
Regards
Hi @jtanadi as promised, the fix is now available in v.4.3.1
Thanks
@jkyberneees Thanks much—that was quick!
I'm working on migrating a service from express. One of the routes currently has 4 middlewares and the TS compiler is giving me an error:
Expected 2-5 arguments, but got 6
.After some digging, I think I found the source of the issue in the type declaration file. It seems odd to me that one could only place up to three middlewares before the handler, and after that would have to switch to a different pattern and use an array for the middlewares, placed after the handler. (Also, side note, the second block seems like a duplicate of the first one?)
Is it not possible to use a rest parameter, since all middlewares and handlers are
RequestHandler<P>
?