Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 446 Bytes

File metadata and controls

32 lines (25 loc) · 446 Bytes
category Object Operation

DeepRequired

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

Usage

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

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

// Expect: {
//   x: {
//     a: 1,
//     b: 'hi'
//   }
//   y: 'hey'
// }
type DeepRequiredProps = DeepRequired<Props>