Open demonhue opened 1 year ago
You are exporting both a and b from b.ts because of the "*",
1 option:
b.ts was
export * as aStuff from "./a.ts"
and c.ts was
import { aStuff } from "./b.ts"
2 option:
b.ts was
export a from "./a.ts"
and c.ts was
import { a } from "./b.ts"
both options should work. of course in option 2 the error then would say that a.ts has unused b, and in option 1 I image it would work, but you would be hiding that b is unused act.
I have the same issue, and I also notice that the reported location
(line number) is wrong. It corresponds to the line number of the original export, not the line number of the export *
. This makes it hard/impossible to use a // ts-unused-exports:disable-next-line
comment to work around the issue.
I reported the same issue in ts-prune
https://github.com/nadeesha/ts-prune/issues/141 and that was never resolved either.
There are 3 files in one folder a.ts, b.ts and c.ts
a.ts
b.ts
c.ts
then it shows that there is an unused export in b.ts named b even though there is no export named b in b.ts