Closed mrseanryan closed 1 year ago
Import statements like this are not handled, so usages are not picked up:
import { foo } from "@foo/index";
note: usages like the following ARE supported:
import { foo } from "./foo/index";
import { foo } from "@foo/other";
So the problem is if file is index, imported via custom path.
In the repro below, there's a single export foo being reported as unused, despite it clearly being used, https://github.com/aryzing/practice-ts-unused-exports
foo
Originally posted by @aryzing in https://github.com/pzavolinsky/ts-unused-exports/issues/154#issuecomment-1404935595
We fixed a bug where importing from index files did not work in some cases, especially with custom paths like 'foo' or 'foo/index'.
Import statements like this are not handled, so usages are not picked up:
note: usages like the following ARE supported:
So the problem is if file is index, imported via custom path.
In the repro below, there's a single export
foo
being reported as unused, despite it clearly being used, https://github.com/aryzing/practice-ts-unused-exportsOriginally posted by @aryzing in https://github.com/pzavolinsky/ts-unused-exports/issues/154#issuecomment-1404935595