Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 413 Bytes

mutable-keys.md

File metadata and controls

24 lines (17 loc) · 413 Bytes
category
Get Object Keys

MutableKeys

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

Usage

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

type Props = {
  readonly name: string;
  age: number;
  visible: boolean;
}

// Expect: 'age' | 'visible' // [!code highlight]
type MutableKeysProps = MutableKeys<Props>