Drawbacks of using TypeScript
If you have an existing project that is written in JavaScript, chances are that you would never even think of migrating to TypeScript. This is because there are no tools available to directly convert JS to TS code and it can be a painstakingly long process. Even though it is a superset of JavaScript, there is still a learning curve to it. If you’re existing team is comfortable with JS, they might take some time to get used to TypeScript. TypeScript may also not be suitable for small to medium-sized projects because of the time involved in project setup, transpilation, etc.
Drawbacks of TypeScript |
---|
1. Transpilation time can affect large codebases, especially when live coding |
2. Steeper learning curve |
3. No direct method to convert JS projects to TS projects |
4. Adoption is not widespread; the availability of resources is only catching up |
Transpilation is the process of converting TypeScript to JavaScript so that it can run on the browser. Even though it is mostly done on the fly, it still takes some resources to perform this. Live reloading of a page to view new changes can sometimes be a problem in large codebases due to this.