use<T> method
void
use<T>(
- T f
Implementation
void use<T>(T f) {
if (f is Middleware) {
reqHandlers.add(f);
return;
}
if (f is ErrMiddleware) {
errHandlers.add(f);
return;
}
throw "This method is not type of `Middleware` or `ErrMiddleware`";
}