I'm not really aware of a type system that enforces code actually be called. I know lots of linters do check for unused code, but generally only at the local level (ex - you imported/included X but never called it)
I agree 100% that it saves time during refactoring, but it's not going to catch that your NicheHelper class that was only called in one place is not called anymore. Nor is it going to find and highlight css that can be ditched as well.