Skip to content

DeepRequired

Category
Object Operation

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

Usage

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

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

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