The greatest skill issue of all time: building my first typescript application


I recently just got a job at in which I had to learn Typescript and Supabase for an upcoming project. I decided to build a personal project with the two new technologies I was going to learn, but little did I know that it would hit me in the face really hard.

This project inspired me a lot and I wanted to make something similar, so I did a bit of brainstorming on some things that could be improved, and went head-on into the development process.

I started with my favorite stack which was Next.js + SCSS, set up integration with supabase db + typescript, and set off.

For the first two or three days, developing was smooth and I was able to get a lot of things done. At the last day, which was Sep 10th, 2022, I was just about to run npm run build, kick my project into production, and release it.

After doing so, I nearly a thousand typescript errors, resulting in an app that would not even dare to compile. My jaw hit the floor – after all this work, I had about twice as much as before. I never realized that next.js didn’t have typescript linting in development mode 🤯. I set off with the help of stackoverflow and typescript’s official website and moved on to continuously fix typescript errors for the next four to five hours.

It was a pretty good laugh for the replit discord community and probably for a lot of you guys as well 😂. Of course I can’t go without a laugh about how silly a mistake I made.

It would turn out that I coded in plain javascript even in typescript and tsx files for about 90% of the time. Things worked, so I moved on without taking notice of stuff, but it would end up biting me back later. I did code the entire thing within replit, which runs entirely in the browser. That means no in-editor typescript parsing. Next time, I sure will not do that again.

After fixing all the bugs, I finally released my project. I’ll tell you what: there is nothing more satisfying than seeing tsc tell you that there are zero typescript errors.

After all this pain, I really want to shout “I HATE TYPESCRIPT”, but it was 100% my fault for causing this. Typescript is definitely something I will use again – and while developing, I sure will use my types, interfaces, and all the other good stuff.

Surprisingly, this was probably one of my first projects where I was able to push to production with nearly zero bugs. Now I know why y’all love typescript so much!

I did, in the last five hours of development, manage to learn a majority of the things in typescript, which was quite helpful.

So of course I can’t end this post without showcasing my project 😉

I’d love some feedback on the project if you have any, and do smash the follow button on replit if you enjoyed it.

Happy coding y’all – and for you guys that have just started typescript, don’t make the same mistake I did

Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post

Understanding Linux and Its Commands

Next Post

Write SQL Queries With Confidence (TypeScript + Postgres)

Related Posts