Day01: Why I Want to Learn TypeScript
This is an overdue introduction. About a year after switching careers, I kept hearing the name TypeScript and wondered what it was. Is JavaScript going to die? I just started learning it.
Day01: Why I Want to Learn TypeScript
Introduction
This is an overdue introduction. About a year after switching careers, I kept hearing the name TypeScript and wondered what it was. Is JavaScript going to die? I just started learning it. Later, I learned that it is a strongly typed version of JavaScript, which made me feel a bit relieved. I thought to myself: "I can learn it later," and then I became lazy and still haven't learned it.
As for why I decided to stop being lazy and participate in this challenge, I was quite surprised myself. I am very grateful for the encouragement from the great people I met at the web lab event at the end of last year, which gave me the courage to push myself a bit.
At first, I thought of many topics I wanted to learn, such as improving my React skills, implementing D3.js, Three.js, writing APIs, etc. After watching a recent JSDC live stream titled "Should Modern Projects Introduce TypeScript?", I immediately decided to dive in and learn TypeScript. So, it's time for front-end developers to learn TypeScript.
What Can TypeScript Do?
So, what can TypeScript do? Let's refer to the slides from the JSDC presentation by Bo Ge:
❓ This is a mistake that everyone has probably made. Did you see the error in the following image?

. . .
🙄 It's just a typo, missing an s. Sometimes, even if an error is reported, you still can't find it. JavaScript is a free spirit; you never know what object you're dealing with. It's fun to write, but debugging can be a headache.
✅ The following image shows how to use TypeScript's interface to define the type of an object, allowing you to immediately know the errors during development, reducing a lot of debugging time.

My TypeScript Learning Journey
Generally, I will refer to the official TypeScript handbook for learning, as well as Bo Ge's beginner's guide and articles from other experts. I will learn in a relaxed manner, hoping to get through 30 articles!
My learning directions include:
- TS environment installation + automatic compilation
- tsconfig.json TS initialization configuration
- Three methods of specifying types in TS
- TS data types
- Primitive types
- Object types
- Types unique to TypeScript (there are many)
- TS Interfaces
- What is Narrowing?
- Generics
- Functions
- Classes
- Interfaces & Classes
- Modules
- React + TypeScript applications
My writing skills are not great, so I will treat this as notes. I will also refer to documents, and not all content is original. If there are any copyright issues or errors, please feel free to point them out. Thank you very much!
PS: I suddenly saw a joke the day before the competition, found it very funny, and decided to entertain myself—hope it brings you a smile 😊
References
Related Posts
Day30 :I finally finished!
I finally finished! Recently, I went to draw, and here is a drawing of "The Little Prince and the Fox." My favorite part of "The Little Prince" is their story. Drawing is really therapeutic, just like the feeling of finishing this challenge.
Day29 :TypeScript Learning : React + TypeScript Todo App Part2
Continuing with the Todo app part 2, I will document the issues encountered during the implementation.
Day28 :TypeScript Learning : React + TypeScript Todo App Part1
After taking so many notes, it's finally time to implement a simple to-do app and document the issues encountered during the implementation.