Handler<Opts>: {
(req, ctx, options?): Response | Promise<Response>;
(req, res, options?): unknown;
(req, resOrOpts, options?): unknown;
}
Type declaration
- (req, ctx, options?): Response | Promise<Response>
Parameters
req: NextRequest
Optional
options: Opts
Returns Response | Promise<Response>
- (req, res, options?): unknown
Parameters
req: NextApiRequest
res: NextApiResponse<any>
Optional
options: Opts
Returns unknown
- (req, resOrOpts, options?): unknown
Parameters
req: NextApiRequest | NextRequest
Optional
options: Opts
Returns unknown