Custom Data Types in TypeScript

We’ve already seen the standard data types in JavaScript and TypeScript. However, JavaScript allows for class, and we want to therefore be able to define a custom data type within TypeScript. Since JavaScript supports classes and object-oriented programming, so does TypeScript. You can explicitly describe this object’s shape using an interface declaration. Then, to define an object…

Installing TypeScript

You will need to install the TypeScript engine for you to use TypeScript. This is because your TypeScript code must be converted into JavaScript, so it needs a program called a transpiler to do the conversion to JavaScript so that a browser can run it. What does a Transpiler Actually Do? A transpiler is not…

Installing Node.JS

To install TypeScript, it is helpful to have Node.JS because you will need nvm to install the TypeScript. To install Node.JS if you don’t have it, you can go to https://nodejs.org/en/download/prebuilt-installer to download an installer. On that page, you can choose your OS, the version of the software, and which processor you want. Download the…