2 ms·
I think it might be nice to allow for inference at the pub(crate) level and below (or maybe only within a module if you wanted to be extra cautious). Now that I
by vlovich123 4y ago
I think it might be nice to allow for inference at the pub(crate) level and below (or maybe only within a module if you wanted to be extra cautious). Now that I've had a lot of experience with TS, I'd say the probability that you accidentally change the type and the code doesn't fail is minimal, so the productivity gains of being kind to the user outweigh the value of extra verbosity. And ultimately that's all type checking is for - to make sure your types form an internally consistent system that you can reason about and avoid making mistakes on.