category | alias |
---|---|
Get Object Keys |
OptionalKeys |
Get union type of keys that are partial in object type T.
import type { PartialKeys } from '@utype/core'
type Props = {
name: string;
age?: number;
visible?: boolean;
}
// Expect: 'age' | 'visible' // [!code highlight]
type PartialKeysProps = PartialKeys<Props>