Tim Mouskhelichvili • February 27, 2023 • 3 minutes to read
You may have seen a mysterious syntax of three dots when you open a TypeScript file in your day-to-day coding life. This syntax is called the spread operator. The spread operator allows to spread or expand iterable objects into [...]
Tim Mouskhelichvili • November 14, 2022 • 2 minutes to read
If you've been writing TypeScript code for long enough, you've undoubtedly seen occurrences of the double question mark operator. The double question mark operator or nullish coalescing operator helps assign a default value to a null or undefined TypeScript [...]
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 • May 3, 2022 • 2 minutes to read
JavaScript supports many different operators (for example, the concatenation operator) to help developers work with objects. One of those operators is the JavaScript power operator. Developers have two distinct ways of using the power operation. Firstly, you can use [...]
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 7, 2022 • 2 minutes to read
Summary TypeScript just like JavaScript has a special typeof operator. In TypeScript, the typeof operator is used to refer to the type of a variable in a type context. const v = 'This is a string'; const data: typeof [...]