Latest posts

Use React with TypeScript

2020-12-16 React

React and TypeScript are a great team because TypeScript supports the JSX syntax. This tutorial will show you code examples on how to type your React web application, so that you can benefit from strong typing in your UI components.

Continue reading →

Understanding Generators, Iterators and Iterables

2020-11-30 Hands-On

A generator function returns a lazy iterator, which generates data only on demand. In the following tutorial, Benny will show you how to code your own generator functions in TypeScript. You will learn the differences between iterators and iterables and how to refactor your code to use generator functions.

Continue reading →

When to use static methods in TypeScript?

2020-10-07 Best Practices

When developing class functions that don’t rely on an internal state, it’s a good idea to turn them into static methods. This can be easily done by adding the keyword static to your function’s declaration.

Continue reading →

Fastest way to set up a TypeScript project with Node.js (npm)

2020-08-04 Hands-On

Setting up a TypeScript project with Node.js takes only a few minutes. Here is how to do it the fastest way by just using npm and yarn.

Continue reading →

Error TS2307: Cannot find module events

2020-06-03 Hands-On

Extending the EventEmitter class from Node.js might cause error TS2307. Here is how to fix it.

Continue reading →

Top-level await in TypeScript 3.8

2020-03-30 New Features

TypeScript 3.8 introduces a new functionality which is called top-level await. It allows developers to use the await keyword without a surrounding async function at the top level of a module.

Continue reading →

Convert to milliseconds

2019-07-02 Hands-On

Learn how to get the milliseconds of a specified date in your desired timezone.

Continue reading →

TypeScript code coverage with Karma

2019-04-28 Testing

Configuring code coverage with TypeScript and Karma to get coverage reports for code running in web browsers.

Continue reading →

Anatomy of an Electron 4 application

2019-04-15 Hands-On

Overview of main concepts in Electron 4 applications.

Continue reading →

Setup TypeScript code coverage for Electron applications

2019-04-07 Testing

Learn how to include all source files for code coverage reporting in an Electron app. In the following tutorial we will create TypeScript code coverage from Electron’s main and renderer process.

Continue reading →
123