- withValidation(__namedParameters): ((handler?: ((req: NextApiRequest, res: NextApiResponse) => any)) => ((req: NextApiRequest, res: NextApiResponse, next?: NextHandler) => Promise<any>))
Parameters
- __namedParameters: ValidationHoF
Returns ((handler?: ((req: NextApiRequest, res: NextApiResponse) => any)) => ((req: NextApiRequest, res: NextApiResponse, next?: NextHandler) => Promise<any>))
- (handler?): ((req: NextApiRequest, res: NextApiResponse, next?: NextHandler) => Promise<any>)
Parameters
Optional
handler: ((req: NextApiRequest, res: NextApiResponse) => any)- (req, res): any
Parameters
- req: NextApiRequest
- res: NextApiResponse
Returns any
Returns ((req: NextApiRequest, res: NextApiResponse, next?: NextHandler) => Promise<any>)
- (req, res, next?): Promise<any>
Parameters
- req: NextApiRequest
- res: NextApiResponse
Optional
next: NextHandler
Returns Promise<any>