Could you provide examples of such risks? Because in my understanding, if some function/constant is exported but never imported anywhere, then it must be dead code and never run. And if it was reachable, then TypeScript would fail the compilation. As such, it sounds reasonably safe to me to remove it.
I only see these potential risks:
1. Using a mix of TS/JS and having some blind spots where we could accidentally delete non-dead code without the compiler noticing.
2. Having and relying on side effects. For example, `export const foobar = thisFnWillDoSthImportant()` and then, yes, removing that would break things.
3. Having separate projects/libs where some consumer might be accessing your exports directly.
I only see these potential risks:
1. Using a mix of TS/JS and having some blind spots where we could accidentally delete non-dead code without the compiler noticing.
2. Having and relying on side effects. For example, `export const foobar = thisFnWillDoSthImportant()` and then, yes, removing that would break things.
3. Having separate projects/libs where some consumer might be accessing your exports directly.
Do you see other risks than those?