Book Your Free Call
Tim Mouskhelichvili • July 27, 2022 • 3 minutes to read
When looking through other TypeScript libraries' source code, maybe you have encountered a strange exclamation mark operator placed after a member. This operator is a TypeScript-only feature and does not exist in JavaScript. It is called the non-null assertion [...]
Tim Mouskhelichvili • July 26, 2022 • 2 minutes to read
Named parameters exist in multiple languages such as C# or PHP, and developers from those languages may expect that TypeScript also provides this feature. Unfortunately, this language does not provide true named parameters. However, it is still possible to [...]
Tim Mouskhelichvili • July 25, 2022 • 2 minutes to read
Sometimes, developers need to declare class constants accessible by all the class's methods. Luckily, this is very easy to accomplish in TypeScript. To declare class constants in TypeScript, you can use the readonly keyword, like so: class Cat { [...]
Tim Mouskhelichvili • July 20, 2022 • 3 minutes to read
Sometimes developers need to define a default parameter for a TypeScript function. Luckily, TypeScript, just like its counterpart JavaScript, offers a simple way to define default parameters. In TypeScript, you can define a default parameter like so: const getUser [...]
Tim Mouskhelichvili • July 19, 2022 • 3 minutes to read
TypeScript, just like such languages as C# or Java, provides support for abstract classes. It is a valuable feature since JavaScript doesn't support the abstract keyword. This brings the question of what is an abstract class and how it [...]
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 [...]