Kickstart Your TypeScript Set Up 6 exercises

Installing the Total TypeScript VS Code Extension

Before we continue, it's a good idea to install the Total Typescript VS Code extension. This extension provides helpful hints on syntax and error translation, making it easier to learn TypeScript.

To install the extension, launch VS Code and open the Extensions Marketplace by clicking the icon in t

Loading explainer


00:00 Before we continue, I recommend that you install the Total Typescript VS Code extension too. What this does is it helps give you some really helpful hints on various syntax and also gives you error translation too.

00:13 So if you go inside the marketplace, you can see we have Total Typescript inside there and I have it installed, but you can just install it by pressing the blue button when you find it. Now, what this means is that if I look at some code here

00:29 and I see that you might not understand this code so far, but if I hover over this red squiggly line, you can see that there's a num, it's declared, but its value is never read. And also, type string is not assignable to type number. What we have here is in this translation thing, which the extension adds,

00:46 is it basically says, I was expecting a type matching number, but instead you pass string. And so this translation basically gives you just another perspective on the TypeScript error, maybe putting it in language that you can kind of more easily understand. And the Total Typescript extension is really just an extra companion to help you learn TypeScript,

01:06 help you get scaffolded off the ground, and to basically give you something that you can reference in this book and make sure that you're on the right track. So I recommend installing the Total Typescript extension before you continue.