I found the logical issue in 22th problem
Middleware type don't consider promises as output.
If we add one more middleware after middleware with async function we see that req become Promise:

Solution: add Promise<> variant to return value:
use<NewTOutput extends TOutput>(
middleware: Middleware<TOutput, NewTOutput | Promise<NewTOutput>>
): DynamicMiddleware<TInput, NewTOutput> {
this.middleware.push(middleware);
...
+ | Promise<NewTOutput> solves the problem
I found the logical issue in 22th problem
Middleware type don't consider promises as output.
If we add one more middleware after middleware with async function we see that
reqbecome Promise:Solution: add Promise<> variant to return value:
+
| Promise<NewTOutput>solves the problem