Type alias Simplify<T>

Simplify<T>: {
    [KeyType in Keys<T>]: T[KeyType]
} & EmptyObject

Simplify<T> flattens the structure of a given type by resolving intersections and reducing redundant wrapping, making complex types easier to work with. This type is particularly helpful for deeply nested mapped types, where readability and simplicity of the resulting type is crucial.

Type Parameters

  • T

    The type to simplify.

Example

type Flattened = Simplify<{ a: string } & { b: number }>; // Result: { a: string; b: number }