Reflecting on Typescript

05 Sep 2024

An Introduction to TypeScript

Over the past week, I’ve been introduced to TypeScript as part of my Introduction to Software Engineering course at UH Manoa. Given that TypeScript is a derivative of JavaScript, I found the transition relatively smooth, particularly since I already had some exposure to Java. I see it as a natural progression—learning Java gave me a solid foundation in programming concepts, while JavaScript helped me take that knowledge into the web development sphere. TypeScript, then, feels like an extension by offering more structure and predictability while staying true to the core principles of JavaScript.

One of the immediate differences I noticed between TypeScript and JavaScript is TypeScript’s emphasis on static typing. Unlike JavaScript, where variable types can change dynamically, TypeScript allows you to define variable types explicitly. This initially felt a bit restrictive, but I quickly realized how it can lead to fewer runtime errors and a more predictable coding experience. It’s like having guardrails that help prevent common mistakes, which is especially useful when working on larger projects where consistency is key.

Process of Learning

While I’m still exploring the full range of features TypeScript offers, I hope to gain a deeper understanding and appreciation for everything Typescript has to offer. I have always thought about the idea of when you're in the process of learning anything new, your knowledge of said topic can be described as a circle of light illuminating a dark environment. As the area of your expertise expands, so does the circumference of your ignorance as the boundary of what you know.