I'm reading from a few other similar questions/answers and one point seems to be that any valid JS is basically TS as well?
If that is the case:
const express = require('express');
const bodyParser = require('body-parser');
const app = express();
app.use(bodyParser.json());
const port = process.env.PORT || 5000;
app.listen(port, () => console.log(`Server started on port ${port}`));
TS attempt
import express = require('express');
import bodyParser = require('body-parser');
const app = express();
app.use(bodyParser.json());
const port: number;
port = process.env.PORT || 5000;
app.listen(port, () => console.log(`Server started on port ${port}`));