pzavolinsky / ts-unused-exports

ts-unused-exports finds unused exported symbols in your Typescript project
MIT License
749 stars 49 forks source link

Add example of false positive with re-export involving index and * #269

Closed mrseanryan closed 1 year ago

mrseanryan commented 1 year ago

This PR re-produces #216

~/src/github/other/ts-unused-exports/example/import-and-re-export ~/src/github/other/ts-unused-exports/ispec
3 modules with unused exports
/Users/Sean.Ryan/src/github/other/ts-unused-exports/example/import-and-re-export/src/index.ts: unusedInTopIndex
/Users/Sean.Ryan/src/github/other/ts-unused-exports/example/import-and-re-export/src/a/index.ts: *:/Users/Sean.Ryan/src/github/other/ts-unused-exports/example/import-and-re-export/src/a/a/a
/Users/Sean.Ryan/src/github/other/ts-unused-exports/example/import-and-re-export/src/a/a/a_unused.ts: unusedInA
[FAIL] Expected 2 issues, but got 3.

Could be tricky as this is a 'transitive' import ...

The top-level import of src/a/index should also mark the expanded import as included 'src/a/a/a'

mrseanryan commented 1 year ago

TODO