category | alias |
---|---|
X Series |
DeepReadonlyByKeys |
Make specified properties in the object readonly, regardless of how deeply nested they are.
import type { DeepReadonlyX } from '@utype/core'
type Props = {
x: {
a: 1
b: 'hi'
},
y: 'hey'
}
// Expect: {
// x: {
// a: 1,
// readonly b: 'hi'
// }
// readonly y: 'hey'
// }
type DeepReadonlyXProps = DeepReadonlyX<Props, 'b' | 'y'>