Open blechatellier opened 4 weeks ago
Hi, can you share an example to showcase current limitations and where .use
will shine? Will help me understand the root problem.
I have a procedure for logging, one for checking user auth, another one for rate limiting.
At the moment I need to do something like loggingProcedure(authProcedure(rateLimitingProcedure))
. If I want to pass in some arguments to the procedure (ie: roles to check for auth), I need to nest them loggingProcedure(authProcedure(roles)(rateLimitingProcedure))
. It's all possible to do as it is but a chaining method like .use()
would help for readability and composability.
This is a suggestion for chaining procedure, it would be good to have a
.use()
instead of having to pass the chained procedure as an argument to another procedure, makes things a bit difficult to nest.