Skip to content

ObjectKeys

Category
Get Object Keys

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

Usage

ts
import type { 
ObjectKeys
} from '@utype/core'
type
Props
= {
name
: string;
breakfast
: {
foods
: string[]; };
dinner
: {
foods
: string[]; };
} // Expect: 'breakfast' | 'dinner' type
ObjectKeysProps
=
ObjectKeys
<
Props
>