Skip to content

PartialKeys

Category
Get Object Keys
Alias
OptionalKeys

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

Usage

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