Options
All
  • Public
  • Public/Protected
  • All
Menu

next-validations

Index

Functions

Functions

withValidation

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

    • __namedParameters: ValidationHoF

    Returns (handler?: (req: NextApiRequest, res: NextApiResponse<any>) => any) => (req: NextApiRequest, res: NextApiResponse<any>, next?: NextHandler) => Promise<any>

      • (handler?: (req: NextApiRequest, res: NextApiResponse<any>) => any): (req: NextApiRequest, res: NextApiResponse<any>, next?: NextHandler) => Promise<any>
      • Parameters

        • Optional handler: (req: NextApiRequest, res: NextApiResponse<any>) => any
            • (req: NextApiRequest, res: NextApiResponse<any>): any
            • Parameters

              • req: NextApiRequest
              • res: NextApiResponse<any>

              Returns any

        Returns (req: NextApiRequest, res: NextApiResponse<any>, next?: NextHandler) => Promise<any>

          • (req: NextApiRequest, res: NextApiResponse<any>, next?: NextHandler): Promise<any>
          • Parameters

            • req: NextApiRequest
            • res: NextApiResponse<any>
            • Optional next: NextHandler

            Returns Promise<any>

Generated using TypeDoc