Tips for Performant TypeScript
Note how some of these are directly at odds with writing easily maintainable code. For example, using type annotations for return types [0]:<p><pre><code>  - import { otherFunc } from "other";
  + import { otherFunc, otherType } from "other";
  
  - export function func() {
  + export function func(): otherType {
        return otherFunc();
    }
</code></pre>
Not manually annotating the return type here reduces both the work you need to do when refactoring and the visual overload when working with the code. In my opinion, both of those are far more important than small changes in compile time.<p>[0] <a href="https://github.com/microsoft/TypeScript/wiki/Performance#using-type-annotations" rel="nofollow">https://github.com/microsoft/TypeScript/wiki/Performance#usi...</a>