Use modern TypeScript syntax and conventions throughout the codebase. This includes:
const instead of var for variable declarations unless reassignment is neededimport express from 'express') instead of CommonJS require()Example (before):
const express = require("express");
const app: import("express").Application = module.exports = express();
app.get('/', function(request, response) {
console.log(request.url);
Example (after):
import express from 'express';
import { Request, Response } from 'express';
const app = express();
app.get('/', function(request: Request, response: Response) {
console.log(request.url);
});
Enter the URL of a public GitHub repository