webshrine / stdtyp/src / KeysDeep
Type Alias: KeysDeep<T, Depth>
KeysDeep<
T
,Depth
>:Depth
extends-1
?never
:T
extendsReadonlyArray
<infer I> ?KeysDeep
<Extract
<I
,Collection
>,Decrement
[Depth
]> :T
extendsRecord
<infer D,any
> ?StringifyKey
<D
> |KeysDeep
<Extract
<T
[D
],Collection
>,Decrement
[Depth
]> :never
The same as Keys<T>
, but recursively for all nested objects
Type Parameters
• T extends Collection
• Depth extends number
= 20