TS2695

Left side of comma operator is unused and has no side effects.

Broken Code ❌

import express from 'express';
 
const app = express();
 
app.use((, res, next) => {
  res.header('Access-Control-Allow-Origin', '*');
  next();
});

Fixed Code ✔️

You just cannot leave out a callback parameter if you don't want to use it. Mark it with an underscore (_) instead:

import express from 'express';
 
const app = express();
 
app.use((_, res, next) => {
  res.header('Access-Control-Allow-Origin', '*');
  next();
});