Add definition to existing module in Typescript
问题 I am struggling with Typescript and modifying the definition of existing module. We are used to put anything we want to output to "res.out" and at the end there is something like this "res.json(res.out)". This allows us to have general control over the app at the moment of sending the response. So I have function like this export async function register(req: Request, res: Response, next: Next) { try { const user = await userService.registerOrdinaryUser(req.body) res.status(201); res.out =