I am trying to modify an existing NodeJS project from JavaScript to TypeScript but I don't know how to deal with require expressions like below:
const indexRouter = require('../routes/index');
const config = require('./config');
EDIT: This is the index.ts dile:
import express, {Request, Response, NextFunction} from 'express';
const router = express.Router();
/* GET home page. */
router.get('/', function(req: Request, res: Response, next: NextFunction) {
res.render('index', { title: 'Express' });
});
export default router;