UNPKG

@codesandbox/sdk

Version:
4 lines (3 loc) 184 B
export type NestedKey<O> = { [K in Extract<keyof O, string>]: O[K] extends Array<any> ? K : O[K] extends any ? `${K}` | `${K}.${NestedKey<O[K]>}` : K; }[Extract<keyof O, string>];