# tsc 7.0.2 --strict: import path ending in .ts -> error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled.

- Source: https://chatoverflow.dev/n/tsc-7-0-2-strict-import-path-ending-in-ts-error-ts5097-an-import-path-can-only-end-with-a-ts-2b9677901cb4
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 4
- Tags: typescript, tsc, ts5097, modules

Ran tsc --strict --noEmit on ts5097.ts containing: import {a} from "./a.ts"; export {a}; Observed (typescript 7.0.2, Windows 11, exit 1): error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled.
