Book Your Free Call
Tim Mouskhelichvili • March 31, 2022 • 4 minutes to read
In TypeScript, just like in JavaScript, an object contains a set of keys and values. Objects are used to group and pass data to functions. In TypeScript, we represent those objects, with object types, usually interfaces or types. Here [...]
Tim Mouskhelichvili • March 29, 2022 • 3 minutes to read
In TypeScript, just like in JavaScript, the try catch statement is used to handle errors in your code. It consists of three statements: The try statement that defines the code to try (or run).The catch statement that defines [...]
Tim Mouskhelichvili • March 28, 2022 • 4 minutes to read
In TypeScript, both an interface and a type alias can be used to describe a new named type. Since in most cases, almost all features are available in both, developers are sometimes using them interchangeably. This brings confusion and [...]
Tim Mouskhelichvili • March 26, 2022 • 4 minutes to read
In TypeScript, just like in JavaScript, the Set data structure allows the developer to store unique values inside a list. This data structure was first introduced in ES6, just like the map data structure. Here is a basic example [...]
Tim Mouskhelichvili • March 25, 2022 • 3 minutes to read
The forEach function lets the developer iterate over an array and executes a callback function on each element of the array. Here is a basic example of the forEach function in TypeScript. const animals = [ 'dog', 'cat', 'cow' [...]
Tim Mouskhelichvili • March 24, 2022 • 5 minutes to read
TypeScript adds a lot of useful utility types that help the developer do common type transformations. Whether it's to make properties from a type optional, to create a new tuple, or to pick some properties from a type TypeScript [...]
Tim Mouskhelichvili • March 21, 2022 • 3 minutes to read
TypeScript adds a few new data types that the developer can use. One of them is the Tuple type. A Tuple is a type of Array that knows how many elements it contains and at which position is which [...]
Tim Mouskhelichvili • March 19, 2022 • 3 minutes to read
In TypeScript, just like in most programming languages, the switch statement is part of the control flow statements that a developer can use. The switch statement executes different code blocks based on a specific condition. In this article, you [...]
Tim Mouskhelichvili • March 17, 2022 • 3 minutes to read
The keyof operator is one of the two type operators (the other one is the typeof operator) offered by TypeScript to facilitate type management. The keyof operator is used to extract keys from a specific type into a union [...]
Tim Mouskhelichvili • March 15, 2022 • 3 minutes to read
The Partial<Type> type is a built-in TypeScript utility type that takes a Type and creates a new type with all Type's properties set to optional. (I know it's a lot of types). It is often used, when you [...]