Strictness of Types

People, when they come to TypeScript, might have different ideas in mind when it comes to how strict they want types checked. Some people don’t want types at all, like JavaScript currently is, and want to use other aspects of TypeScript, while others might want to be very strict. The default experience with TypeScript, where…

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 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 of this…

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 transpilersJavaScript while doing type checking, What does a Transpiler Actually Do? A transpiler is not a compiler or interpreter. It serves a similar purpose…

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…