use<T> method

void use<T>(
  1. 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`";
}