pzavolinsky / ts-unused-exports

ts-unused-exports finds unused exported symbols in your Typescript project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

False positives on index with TS "paths" option

robrechtme opened this issue · comments

This issue relates to #52. The tsconfig.json mentioned there contains two entries for each module.

In fact the extra line isn't needed: a tsconfig.json like this would also resolve index paths:

"paths": {
  "app/*": ["app/src/*"],
  "utils/*": ["utils/src/*"],
},
import { foo } from 'utils'; // TS can handle this

Unfortunately, a tsconfig.json like this leads to false positives on exports from the index.ts file.

Edit: Turns out TS does not resolve index files properly. I had extra declarations like this in my package.json 😄 . Closing this issue.