Skip to content

MutableKeys

Category
Get Object Keys

Get union type of keys that are mutable (not readonly) in object type T.

Usage

ts
import type { 
MutableKeys
} from '@utype/core'
type
Props
= {
readonly
name
: string;
age
: number;
visible
: boolean;
} // Expect: 'age' | 'visible' type
MutableKeysProps
=
MutableKeys
<
Props
>