pzavolinsky / ts-unused-exports

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

[Regression] Dynamic imports in ternary not detected #139

Closed jp7837 closed 4 years ago

jp7837 commented 4 years ago

Regression from 6.1.1 to 6.2.0

return foo
    ? import("a").then(({ subA }) => new subA())
    : import("b").then(({ subB }) => new subB(id));

subA and subB will be not be detected as used

jp7837 commented 4 years ago

@mrseanryan looks like a potential regression from #128

mrseanryan commented 4 years ago

@jp7837 thanks for reporting it.

mrseanryan commented 4 years ago

@jp7837 @pzavolinsky hi - I won't have time for this until next weekend. Hope that is OK.

Of course, if someone else wants to have a go, be my guest!

Sean