Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 475 Bytes

deep-mutable.md

File metadata and controls

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

DeepMutable

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

Usage

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

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

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