Type alias RouteHandler<T>

RouteHandler<T>: ((request: Request, response: Response) => T | Promise<T>)

Type Parameters

  • T = any

Type declaration

    • (request: Request, response: Response): T | Promise<T>
    • A route handler that can be synchronous or asynchronous returning a Promise.

      Parameters

      • request: Request
      • response: Response

      Returns T | Promise<T>

Generated using TypeDoc