Handler<Opts>: {
    (req, ctx, options?): Response | Promise<Response>;
    (req, res, options?): unknown;
    (req, resOrOpts, options?): unknown;
}

Type Parameters

  • Opts = any

Type declaration

    • (req, ctx, options?): Response | Promise<Response>
    • Parameters

      Returns Response | Promise<Response>

    • (req, res, options?): unknown
    • Parameters

      • req: NextApiRequest
      • res: NextApiResponse<any>
      • Optional options: Opts

      Returns unknown

    • (req, resOrOpts, options?): unknown
    • Parameters

      Returns unknown