DEV Community

Discussion on: Are you still happy with the decision to use TypeScript?

Collapse
 
akashkava profile image
Akash Kava

Defining type is often not an important task, so it leads to code where definitions usually does not match with the actual JavaScript. This leads to unpredictable results.

What we did was we left our mature framework as it is, and we rewrote entire framework in a new version in which everything was written in typescript. This is only possible if you have unit tests for old mature framework which you can run against new framework.

The only problem with this is, you have to do dual patching, any code changes in old code must also be applied to new TypeScript version. Well if old code is mature, the patches will be less and you can also keep your production code away from TypeScript till it is 100% ready.

We have done it and it took over 2 years, but finally it was worth it.