8
5 Comments

Forcing myself to move to Typescript 😱

I hesitated for a long time, I even started the work 2 weeks ago before abandoning it, but this time it's the good one, I convert my Javascript project into Typescript.

For SupaNexTail, it's the right thing to do, but as a solo webdev, having only worked on small projects, it's very hard to see the use of Typescript.

So I hope to change my mind along the way of the migration 😊

And you, have you taken the plunge? How was the transition to Typescript?

, Founder of Icon for SupaNexTail
SupaNexTail
on August 11, 2021
  1. 3

    Yes, definitely worth it! For all the benefits of TypeScript, the thing that really convinced me is autocomplete and catching type errors. Makes me a more efficient and confident programmer, especially with large refactors (which I may put off otherwise), long-running and growing projects, and the future of having more than one person.

    I like video learning, so I did take a couple courses to jump start my knowledge—helps with stuff like generics. It also takes a while before it’s familiar, and it took a month before I could code as fast in TypeScript as in JavaScript. The more you do it, the more you like it.

    Mileage varies across frameworks though. I’m using ReactJS/NextJS and NestJS/NodeJS. I tried TypeScript with Vue, and the surprising lack of support made it more trouble than it’s worth.

    1. 2

      Thank you for your feedback!

      Yes the autocomplete is really powerfull. I have the same stack (Nextjs/Node) and it's not that difficult for simple code.

  2. 1

    I'm in the process of converting Untold RPG (built with React Native) to TS. I was just like you, but I consider myself a convertee now. You need to accept it, including things you may not like in the beginning. In time, you'll see the benefits. Main benefits (as a solo developer): big refractors become easier and future you don't know the codebase as well as you do right now. Being able to see what all variables actually are and consists of without having to theck the code is so worth it.

  3. 1

    You don't need to force yourself to it.
    If you'll start doing or working on complex projects
    the need will become evident and change will be a breeze.

    There's no need to use it on smaller projects.
    Basically, it's better to not use TS for them.

  4. 1

    having only worked on small projects, it's very hard to see the use of Typescript

    It is super useful even when working alone, it will save you A LOT of time in the wrong run, by catching typos, common errors while you type and saving you hours of debugging. Not only this, but also makes things really easy to maintain or refactor, you can rename a field/variable without being afraid that you forgot to change it somewhere that would make your project crash at run time.