1. Home

    2. /
    3. Projects

    Dev diary: Taking off the TypeScript training wheels

    Learning a new language has its challenges, but those challenges make you better
    by brettMar. 19, 2025
    Featured image

    TypeScript has always been a language I didn't quite understand. I always thought that JavaScript was good enough and I didn't actually understand why it needed types to be built into it.

    I guess what I'm trying to say is *types *were something I didn't quite understand.

    So, for this dev diary I want to talk about my first impressions of TypeScript from the perspective of someone that's been doing fine for five years using standard JS and JSX.

    Learning is intimidating

    In the last developer diary I talked about how important it was to make the change from Vite to Next.js. Moving from JavaScript to TypeScript gave me very similar challenges because ultimately I had to learn a new way to build using tools I wasn't comfortable with.

    But moving out of a comfort zone is how we build new skills, and I saw this not only as an opportunity to build a new skill but also a way to see the direction that the industry is moving.

    According to Index.dev, TypeScript is one of the fastest growing languages available today, growing 13% in 2023 alone.

    Part of the reason for this is because TypeScript is a lot safer to use. Because of TypeScript's "type-safe" environment, it's easy to know if you're introducing a bug into your code before you submit it and test it out. This makes it really helpful to debug and write better code—which is something I was definitely interested in learning.

    This took away some of that initial intimidation I was feeling from working with TypeScript. Knowing that working with these tools would make me better at building a product outweighed the hesitation I was feeling.

    How I introduced TypeScript to my workflow

    Moving to TypeScript was initially pretty easy. The UI library I'm currently using for this project, Material UI, and other elements of my tech stack all have really robust TypeScript documentation, so that's really where I started when I was setting things up.

    I love to learn by seeing real world examples, or how other people manage to tackle the same things that I'm trying to use. I feel like when I interact with technology in tangible ways I'm more likely to understand it.

    So I started simple. I first converted all of my existing interface components and pages to TypeScript to get a feel over how the simpler things might be changing. After that, I moved some of my more simplified third-party scripts over from vanilla JavaScript to TypeScript.

    At this point, I was able to see how others might tackle some concepts that I was already familiar with, so I started porting my proprietary functions and scripts to TypeScript.

    The more I moved back and forth between porting already documented tools (like Supabase) to TypeScript and my own scripts, the more things started to click for me.

    It took a lot longer to get everything to compile, but once things started to click for me everything fell into place rapidly.

    Overall, I'm feeling pretty confident with how this conversion worked out and I found that using types has led me to creating better documentation, comments and a deeper understanding of the tools that I'm building.

    Tags:
    updates
    nextjs