Prettify<T>: {
    [K in keyof T]: T[K]
} & {}

Combines members of an intersection into a readable type.

Type Parameters

  • T

Type declaration

    Link

    https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=NdpAcmEFXY01xkqU3KO0Mg

    Example

    type Result = Prettify<{ a: string } | { b: string } | { c: number, d: bigint }>
    // ^? type Result = { a: string; b: string; c: number; d: bigint }

    Generated using TypeDoc