Q:

How to get the same datatype as of Post method of express in typescript

I want to pass my request and response to controller but I don't get the correct data type.
I have my Router below
import express from 'express'
import { ProjectController } from '../controllers/projectController';

const router = express.Router()
const projectController = new ProjectController()

router.post('/', function(request, response) {
    projectController.save(request, response)
})

export default router

The data of request above is export interface Request extends http.IncomingMessage, Express.Request and it take from /node_modules/@types/express-serve-static-core/index.d.ts
The data of response above is export interface Response extends http.ServerResponse, Express.Response and it take from /node_modules/@types/express-serve-static-core/index.d.ts
I have my Controller below
export class ProjectController {
    public save(request: Request, response: Response) {
        response.status(200).send
    }
}

The datatype of request above is interface Request extends core.Request { } and it takes from /node_modules/@types/express/index.d.ts
The datatype of response above is interface Response extends Body.
The problem is that when I pass request and response from post method to controller's save method, the datatype is different and it doesn't show status and send method.
So how do I declare a function with the same data type as of the post method.

A:

I solved this problem using this thread.
router.ts
import express from 'express'
import { ProjectController } from '../controllers/projectController';

const router = express.Router()
const projectController = new ProjectController()

router.post('/', function(req, res) {
    projectController.save(req, res)
})

export default router

controller.ts
import { Router, Request, Response } from 'express'

export class ProjectController {
    public save(req: Request, res: Response) {
        res.status(200).send({message: 'Reached here'})
    }
}

