FuncController type represents a function controller
used in routing. It defines a function type that takes two parameters: a Request
object and a Response object, and returns a Promise<void> or void. This type is
commonly used to define the handler functions for different routes in a web application.
The Request object contains information about the incoming request, such as method,
path, params, query, and body. The Response object provides methods to send responses
back to the client. The FuncController type is generic, allowing you to specify the
type of parameters (P) that the controller function expects.
FuncController
type represents a function controller used in routing. It defines a function type that takes two parameters: aRequest
object and aResponse
object, and returns aPromise<void>
orvoid
. This type is commonly used to define the handler functions for different routes in a web application. TheRequest
object contains information about the incoming request, such as method, path, params, query, and body. TheResponse
object provides methods to send responses back to the client. TheFuncController
type is generic, allowing you to specify the type of parameters (P
) that the controller function expects.