3 ms·
I would also add that type inference is one of the biggest differentiators when it comes to developer experience. When you have to manually type every single th
by _bxg1 6y ago
I would also add that type inference is one of the biggest differentiators when it comes to developer experience. When you have to manually type every single thing, even local variables, it's easy for the system to hinder more than it helps. Whereas in TypeScript you're free to omit return types whenever you want them to be driven by the internal code, or specify them when you want to establish a stronger contract. The same goes for local variables. You can even call generic functions without parameterizing the generic type if it can be inferred from the arguments.