feat: require JSDoc in new api (#50429)

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Naomi Carrigan
2023-08-03 09:20:54 -07:00
committed by GitHub
parent 2a13fefdf0
commit 0aa1ad0d09
23 changed files with 275 additions and 3 deletions

View File

@@ -3,6 +3,13 @@ import type { NextFunction, NextHandleFunction } from '@fastify/middie';
type MiddieRequest = Parameters<NextHandleFunction>[0];
type MiddieResponse = Parameters<NextHandleFunction>[1];
/**
* Test middleware used to log request and response data?
*
* @param req The request payload.
* @param res The response to be sent back to the request.
* @param next Callback function to indicate that the middleware logic is complete.
*/
export function testMiddleware(
req: MiddieRequest,
res: MiddieResponse,