Skip to content

DeepKeys

Get the union type composed of all keys from nested objects.

Usage

ts
import type { 
DeepKeys
} from '@utype/core'
type
Props
= {
a
: string;
b
: number;
c
: {
d
: {
e
: string;
} } } // Expect: 'a' | 'b' | 'c' | 'd' | 'e' type
DeepKeysProps
=
DeepKeys
<
Props
>