TS5097

An import path can only end with a .ts extension when allowImportingTsExtensions is enabled.

Broken Code ❌

import { getDistanceReport } from './getDistanceReport.ts';

Solution:

Enable allowImportingTsExtensions in your tsconfig.json file.

Fixed Code ✔️

{
  "compilerOptions": {
    "target": "ES6",
    "module": "commonjs",
    "strict": true,
    "esModuleInterop": true,
    "allowImportingTsExtensions": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true
  },
  "include": ["src/**/*"],
  "exclude": ["coverage", "dist", "node_modules"]
}