Skip to main content

Framework Typescript

Framework Code

Concepts and techniques where code needs to be very generic such as frameworks or libraries.

Conditional Types

Many of TypeScript's utility types are implemented using conditional types, often in combination with mapped types.

type ReplaceNumberPropertiesWithNull<T> = {
[K in keyof T]: T[K] extends number ? null : T[K];
};

Questions

Which engineering decision related to this topic has the highest switching cost once made — and how do you make it well with incomplete information?

  • At what scale or complexity level does the right answer to this topic change significantly?
  • How does the introduction of AI-native workflows change the conventional wisdom about this technology?
  • Which anti-pattern in this area is most commonly introduced by developers who know enough to be dangerous but not enough to know what they don't know?