Now let us know when not to use TypeScript at all. Here are some use-cases which you might reconsider the use of TypeScript:

When building small apps or prototypes

I think this is fairly obvious. When you’re building prototypes for presenting the app that you’re building in the market as quickly as possible, you don’t add additional type checkers in your javascript that might hamper your productivity and delivery.

Let us compare the two code when programming some features:

JavaScript

const myFunction = (x, y) => x * y;

TypeScript

const myFunction = <T>(x: T, y: T) => x * y;

Adding TypeScript code in the project requires us to declare types such as this example and you might hate doing that during the prototyping phase.

Notice here that the ones using TypeScript are noisier since we need to declare types to get the job done. Although one could argue that the one using TypeScript is verbose and easy to debug when things get bad for this functionality but that depends on how you or your developer will make use of the type system. Your developer may just simply toss in a lot of any as type in the function so it may not be that helpful at all.

This use-case is debatable though since one might argue that it will save us a lot of time by adding type-checking ahead of time and prevent bugs that might give you some headaches as you build your prototype. It’s true that static types may save you a lot of time in the long run, but not when you’re building your own prototype that might not get to the next stage nor profit it deserves at this point.

Although, in defense of this argument, I believe that TypeScript will only have a little impact at this stage because we’re still building a small app. We rarely have the type issues since JavaScript is built as a dynamic programming language that can parse data regardless of types so it’s very relaxed and forgiving compared to other programming languages.

When it’s not giving any value nor results you expected

TypeScript is only good when it delivers the results it promises but bad if it fails to deliver. You must know first the reason why you want to use and apply it in projects in the first place before actually delving deeper to use it. If it’s not improving your productivity nor the durability of the app you’re building, then you’re not getting much value out of it.

For example, identify first the type of app that you are about to build. Is it a prototype? An enterprise? An API that will be consumed by hundreds of developers? An app that is only focused on User Interactions or Animations? Or an app filled with complex computations and formulas?

You need to evaluate the effectiveness and values TypeScript can offer you first in your use-case then use it so that you can get the most out of it.

When your developers are inexperienced and not willing to adapt in it

You can carefully evaluate and observe how experienced your developers are in using TypeScript. You can also gauge how much learning curve time do they need when they’re going to use it. If you have a bunch of developers who don’t know TypeScript, you might have to back out in enforcing this technology to them unless there’s ROI in doing so.

We cannot always enforce our team to adapt to TypeScript unless there’s a compelling reason to do so and depending on the type of projects your team handles. This also depends on the type of skillsets they have before you enforce it to them. Do they have OOP backgrounds such as C# and Java? If not, this will only cause harm than good.

Lastly, I think it’s worth asking your team whether they’re willing to adapt and use this technology. It could be selfish on your part to just enforce it without gauging your team’s skillsets, proper justification, and analysis of the problem you’re solving.

The need for TypeScript needs to be further analyzed before we delve deeper and use it in your projects with your team and they will thank you for that!

When you’re using it because of “hype”

Last but not least, if you’re just using TypeScript for the sake of “hype”, I think you’re in the wrong direction. For practice and getting the hang of TypeScript, there is no problem in using it. But to use it in production apps just because of “hype” is unreasonable and not a good indicator that this will add value.

Tech hype is a poor metric to measure one’s values of the tools that we’re using. In the case of TypeScript, it has conquered JavaScript ecosystem by storm and widely used by developers these days due to this hype. I think it’s because most developers using TypeScript came from the background of either Java or C# to the point that it was widely used.

I have to admit that I’m one of those developers that jumped right ahead with TypeScript the moment I’ve seen Microsoft releasing it in its early days since I’m not comfortable in using plain JavaScript back in the day.

I’ve been in that situation wherein I jump back and forth in new technologies that I come across. But as I grew more mature as a Software Engineer, I realized that it’s pointless to delve into new technologies or hypes if it fails to provide the value that we offer.