Overloads & Conditional Types in TypeScript
So we are going to talk about function overloading and conditional types in TypeScript, which is an area of the language that I think lots of people find unsatisfactory.
The intersection between these two features appears to be a common theme from helping people on the offically unoffical TypeScript community discord server and at work. People try to combine different language features in ways that often feel conceptually and syntactically natrual, but often leave them confused and frustrated. Their motivation is type safety, but the result is confusing compiler errors.