Sunday, September 11, 2022
HomeWordPress DevelopmentThe best ability difficulty of all time: constructing my first typescript software

The best ability difficulty of all time: constructing my first typescript software


I lately simply received a job at https://replit.com by which I needed to be taught Typescript and Supabase for an upcoming challenge. I made a decision to construct a private challenge with the 2 new applied sciences I used to be going to be taught, however little did I do know that it could hit me within the face actually laborious.

This challenge impressed me loads and I needed to make one thing related, so I did a little bit of brainstorming on some issues that could possibly be improved, and went head-on into the event course of.

I began with my favourite stack which was Subsequent.js + SCSS, arrange integration with supabase db + typescript, and set off.

For the primary two or three days, creating was easy and I used to be in a position to get a lot of issues completed. On the final day, which was Sep tenth, 2022, I used to be nearly to run npm run construct, kick my challenge into manufacturing, and launch it.

After doing so, I almost a thousand typescript errors, leading to an app that will not even dare to compile. My jaw hit the ground – in spite of everything this work, I had about twice as a lot as earlier than. I by no means realized that subsequent.js did not have typescript linting in improvement mode 🤯. I set off with the assistance of stackoverflow and typescript’s official web site and moved on to repeatedly repair typescript errors for the following 4 to 5 hours.

It was a reasonably good chuckle for the replit discord neighborhood and doubtless for lots of you guys as effectively 😂. After all I can not go and not using a chuckle about how foolish a mistake I made.

It will prove that I coded in plain javascript even in typescript and tsx information for about 90% of the time. Issues labored, so I moved on with out taking discover of stuff, however it could find yourself biting me again later. I did code the whole factor inside replit, which runs fully within the browser. Which means no in-editor typescript parsing. Subsequent time, I positive will not try this once more.

After fixing all of the bugs, I lastly launched my challenge. I am going to inform you what: there may be nothing extra satisfying than seeing tsc inform you that there are zero typescript errors.


In spite of everything this ache, I actually wish to shout “I HATE TYPESCRIPT”, however it was 100% my fault for inflicting this. Typescript is certainly one thing I’ll use once more – and whereas creating, I positive will use my varieties, interfaces, and all the opposite great things.

Surprisingly, this was in all probability one in every of my first initiatives the place I used to be in a position to push to manufacturing with almost zero bugs. Now I do know why y’all love typescript a lot!

I did, within the final 5 hours of improvement, handle to be taught a majority of the issues in typescript, which was fairly useful.


So of course I can not finish this submit with out showcasing my challenge 😉

https://replit.com/@IroncladDev/Fendorea

I might love some suggestions on the challenge when you’ve got any, and do smash the comply with button on replit if you happen to loved it.


Pleased coding y’all – and for you guys which have simply began typescript, do not make the identical mistake I did

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments