Fixing type inference in generic rest parameters

TypeScript
  • 700 words
  • 4 mins

It turns out that combining generics with rest arguments is kind of tricky in TypeScript. Let’s see where the normal approach fails and how we can use tuples to fix it!

read more

Treating types as values with type-level maps

TypeScript
  • 1.6k words
  • 8 mins

With a shift in perspective, we can view complex type declarations as another kind of code. Code where types are values.

There’s no better example of this than the type-level map. Let’s take a closer look!

read more