Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 437 Bytes

partial-keys.md

File metadata and controls

25 lines (18 loc) · 437 Bytes
category alias
Get Object Keys
OptionalKeys

PartialKeys

Get union type of keys that are partial in object type T.

Usage

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

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

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