-
Playing with naturals in TypeScript
Introduction of Template Literal Types in TypeScript 4.1 makes the type system even more interesting. They are like template literals, but on the type level (a template literal type with a placeholder), so we can write code like this:
-
Programming in TypeScript types with tuples
The TypeScript type system has become increasingly powerful, allowing us to create very complex types today. In fact it’s already shown to be Turing complete. Many advanced utilities, including manipulation of object, list and function types can be found in the ts-toolbelt library. Here I make a quick recap of...