> To this point, many teams are already using subsets of TypeScript to improve compilation times. Often times it’s things like always declaring return types on functions to avoid the compiler having to infer it (especially between module boundaries).
I hadn't heard of this trick - how much improvement does it make? Seems like it might be good for readability, too?
This makes sense for semantic reasons though. If you accidentally return a `number` when you returned a `string` in some earlier branch, Typescript will happily unify them and now your function silently returns `string | number`. The linting rule prevents this.
I hadn't heard of this trick - how much improvement does it make? Seems like it might be good for readability, too?