
Lesson Description
The "Why TypeScript Matters" Lesson is part of the full, TypeScript: From First Steps to Professional course featured in this preview video. Here's what you'd learn in this lesson:
Anjana introduces TypeScript as a solution developed by Microsoft to address these challenges, providing a more structured and type-safe approach to JavaScript development.
Transcript from the "Why TypeScript Matters" Lesson
[00:00:00]
>> Anjana Vakil: Our good friend has been around quite a while now, from back in the day in '95, to our modern futuristic sounding year that we're recording this of 2025 A lot has changed in terms of how JavaScript exists in the world So, back in '95, JavaScript was a little scripting language that was meant to add a little bit of interactivity to your websites, you know, handle a button click, pop up an alert, do something else
[00:00:38]
Cool And it only ran in the browser It was just a tool for adding interactivity to webpages And it was used by web developers, and there were fewer of us back then There was less web back then And now fast forward 30 years JavaScript is no longer used to add click handlers alone to web pages It is also used to do all kinds of things There are huge projects and very complex applications written in JavaScript
[00:01:15]
So basically, whatever we want computers to do, somebody has probably figured out a way to do it with JavaScript by now Also, it is no longer the case that we know that JavaScript runs in the browser as part of a web page It can run all kinds of places That's what Node is about Node lets us run it on the server-side We've also got like mobile setups for running JavaScript in other environments and we've got JavaScript running serverlessly to process data in certain places
[00:01:50]
We've got JavaScript everywhere basically that we can think of like if there's a computer, it's embedded in IoT devices all over the place So what used to be a kind of nice contained browser environment for JavaScript is now as large as the universe, basically And instead of web devs just kind of making some cool marquee scroll and whatever, we're now a massive group of software engineers all over the planet that have been building on each other's JavaScript for 30 years
[00:02:31]
And we have huge teams writing JavaScript projects at massive companies We have millions of devs contributing and using each other's JavaScript packages in the open source community So we've really got a very different situation than when JavaScript was developed And that's where, over the years, folks started asking themselves, does it have to be this way
[00:03:04]
Are we stuck with the decisions that the creator of JavaScript, who designed the language in 10 days in 1995, made back then, that are now living on all kinds of different computers in front-end, backend code, embedded code, mobile, all kinds of stuff, and hugely complex projects as well Can we do better Like, could we eliminate these type of problems, type of problems, before we start rendering object object and showing that to our users, or before you get that your flight time is undefined
[00:03:51]
I don't know if that's ever happened to anybody, but it's a fun one And then I guess the question also becomes, can we stop ourselves as developers from even writing that buggy code in the first place So is there a way that we can compensate for some of these loosey goosey features of types of JavaScript which were fine in '95, but not so much in 2025, so
[00:04:28]
This line of questioning led to a bunch of work in the JavaScript community to try to figure out different ways of solving this But by now, a single dominant answer has emerged And it is TypeScript Da da da da Yeah, like spoiler, right No So, TypeScript, which you can read all about at typescriptlang.org They're really great docs and as we just got a sneak preview of, there's a really great playground that you can use to explore TypeScript features, and there's a whole bunch of examples in there
[00:05:12]
And so, these are some really great resources for understanding the nuts and bolts of TypeScript We're going to be looking at them as we go in this course But suffice it to say that TypeScript, and there were a few other projects similar to it, like, for example, Flow was one that I got to work with briefly Was one solution to some of these problems and this was a solution put out by Microsoft, first internally, so not put out, but developed internally at Microsoft around 2010 or so, and then open sourced in I believe 2012
[00:05:55]
And since then, it has really emerged as like the solution that the industry has centered around for how to stop these types of problems from occurring, and how to make our lives less what as developers.
Learn Straight from the Experts Who Shape the Modern Web
- In-depth Courses
- Industry Leading Experts
- Learning Paths
- Live Interactive Workshops