Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 518 Bytes

File metadata and controls

25 lines (16 loc) · 518 Bytes

Home > types-kit > Simplify

Simplify type

Flatten the type output to improve type hints shown in editors.

Signature:

export type Simplify<T> = {
  [K in keyof T]: T[K]
}

Example

type Props = { a: 1, b: 2, c: 3 } & { d: 4 }
// Expect: { a: 1, b: 2, c: 3, d: 4 }
type SimplifiedProps = Simplify<Props>