Closed mattpodolak closed 1 year ago
In this example: const router = baseRouter.clone();
const router = baseRouter.clone();
baseRouter type is NodeRouter<NextApiRequest, NextApiResponse<any>>
baseRouter
NodeRouter<NextApiRequest, NextApiResponse<any>>
I would expect router to be the same type, instead it is: NodeRouter<IncomingMessage, ServerResponse<IncomingMessage>>
router
NodeRouter<IncomingMessage, ServerResponse<IncomingMessage>>
Fixed in https://github.com/hoangvvo/next-connect/commit/da2a5b19b471a8ff893825c6f7e03fba26617ed8
In this example:
const router = baseRouter.clone();
baseRouter
type isNodeRouter<NextApiRequest, NextApiResponse<any>>
I would expect
router
to be the same type, instead it is:NodeRouter<IncomingMessage, ServerResponse<IncomingMessage>>