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 [...]
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 [...]
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 [...]
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 [...]
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 [...]
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 [...]