Skip to content

Files

Latest commit

329743b · Mar 8, 2024

History

History
33 lines (26 loc) · 489 Bytes

deep-partial.md

File metadata and controls

33 lines (26 loc) · 489 Bytes
category alias
Object Operation
DeepOptional

DeepPartial

Make every parameter of an object - and its sub-objects recursively - partial.

Usage

import type { DeepPartial } from '@utype/core'

type Props = {
  x: {
    a: 1
    b: 'hi'
  },
  y: 'hey'
}

// Expect: {
//   x?: {
//     a?: 1,
//     b?: 'hi'
//   }
//   y?: 'hey'
// }
type DeepPartialProps = DeepPartial<Props>