HOW TO DO A TYPESCRIPT CONVERSION
This article addresses two popular approaches to converting a JavaScript-based application to TypeScript: do it as you go, or convert the code base in a “leaves-first” order where no module is converted without first having types for all of its dependencies. Most developers tend to take the first approach, However, there are two major problems with this. First, you will end up having to propagate changes to various files over and over and over again. Second, you cannot rely on the things you have already converted to actually be safe when taking this approach. The rigorous approach is harder but is a better option.