My magic middlewares type
If anyone wants a typescript challange here is one: I am trying to create a tuple type which contains an sequence of
I have a function called
this however does not work, as it complains when using it like following:
Plus points:
I would ideally also like the
MiddlewareHandler types. This MiddlewareHandler is defined as: I have a function called
compose which composes these MiddlewareHandlers. This function takes a generic array of MiddlewareHandler:this however does not work, as it complains when using it like following:
Plus points:
I would ideally also like the
T generic type to require that all following MiddlewareHandlers have the its generic I set to the previous O like following type: