Tim Mouskhelichvili • July 12, 2022 • 2 minutes to read
In TypeScript, checking if a variable or argument is defined is one of the most common tasks. Luckily, it is simple to accomplish. The easiest way to check for undefined in TypeScript is to use a condition check, like [...]
Tim Mouskhelichvili • July 12, 2022 • 2 minutes to read
TypeScript is a programming language that offers many advantages compared to conventional JavaScript. Its most important advantage is the addition of typings. One of the typings added by TypeScript is the never type. This article will explain, in detail [...]
Tim Mouskhelichvili • July 11, 2022 • 3 minutes to read
TypeScript, just like JavaScript, provides support for static methods, properties, and initialization blocks. This brings the question of what a static class is and how it works in TypeScript. A static class contains static properties and methods and is [...]
Tim Mouskhelichvili • July 6, 2022 • 3 minutes to read
As you may know, TypeScript is a strongly typed language. By default, when you declare a function with parameters, you need to pass values for each parameter when you call it. Sometimes, however, developers may want to make a [...]
Tim Mouskhelichvili • July 5, 2022 • 2 minutes to read
TypeScript offers many different utility types that help transform other types. One of the most helpful utility types provided by TypeScript is the Omit type. The Omit type creates a new type by excluding one or multiple properties from [...]
Tim Mouskhelichvili • July 4, 2022 • 2 minutes to read
When coding with TypeScript, developers sometimes need to convert a string to a number. Luckily, JavaScript provides many different ways to do it that you can also use in TypeScript. The easiest way to cast a string to a [...]
Tim Mouskhelichvili • July 2, 2022 • 3 minutes to read
TypeScript offers multiple types to compose existing types into new ones, such as the intersection type or the union type. The union type allows a developer to use more than one data type as a parameter or a variable [...]
Tim Mouskhelichvili • June 30, 2022 • 2 minutes to read
TypeScript provides developers with different ways to combine and compose existing types to create new ones. One such TypeScript feature is the intersection type. The intersection type allows a developer to combine multiple types into one. This article will [...]
Tim Mouskhelichvili • June 28, 2022 • 3 minutes to read
TypeScript is a superset of JavaScript, and just like its counterpart, it supports object-oriented principles such as class inheritance. When a class inherits another class, a developer may want to override a parent class method. Luckily, this is easy [...]
Tim Mouskhelichvili • June 27, 2022 • 2 minutes to read
In TypeScript, developers often need to combine or extend a type to create a new one. Luckily, this is simple to do and is very easy to accomplish. This article will explore different ways of extending a type or [...]