Tag: TypeScript

Type transformations in TypeScript: Removing functions from a type

Type transformations in TypeScript: Removing functions from a type

TypeScript is often quoted as one of the most loved programming languages (StackOverflow, 2022). I guess, what contributes to it is the ease with which TypeScript can be introduced in a JavaScript project and the benefits it bring like static type checking, null safety, better refactoring and IntelliSence support. Another aspect of TypeScript which I…

Read More Read More

Add linting to NodeJs and TypeScript project

Add linting to NodeJs and TypeScript project

We are going to install TypeScript ESLint for finding potential problems with our code. Most online tutorials talk about using TSLint for TypeScript, but it is deprecated now in favour of ESLint. Let’s start by installing ESLint. To configure the linter, we need to create a config called .eslintrc.js in the root directory. Let’s create…

Read More Read More

Setup Nodejs + Typescript development environment

Setup Nodejs + Typescript development environment

Here is the summary: Install Nodejs Initialize Javascript project Convert to Typescript Install ts-node Prerequisite You would need a code editor installed on your system. I personally recommend Visual Studio Code as it has amazing support for Typescript. Install Nodejs Nodejs can be downloaded and installed from here. It will also include NPM (node package…

Read More Read More