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];
};