- getHandler<Opts>(appRouteHandler, pageRouteHandler): ((reqOrOptions, resOrCtx, options?) => void | Promise<void> | Response | Promise<Response> | ((req, resOrCtxInner) => void | Promise<void> | Response | Promise<Response>))
Type Parameters
Opts extends Record<string, any>
Returns ((reqOrOptions, resOrCtx, options?) => void | Promise<void> | Response | Promise<Response> | ((req, resOrCtxInner) => void | Promise<void> | Response | Promise<Response>))
- (reqOrOptions, resOrCtx, options?): void | Promise<void> | Response | Promise<Response> | ((req, resOrCtxInner) => void | Promise<void> | Response | Promise<Response>)
Parameters
reqOrOptions: NextApiRequest | NextRequest | Opts
Optional
options: Opts
Returns void | Promise<void> | Response | Promise<Response> | ((req, resOrCtxInner) => void | Promise<void> | Response | Promise<Response>)