Open shaKY-iota opened 2 years ago
// your answers type TupleToNestedObject<T extends string[], U> = T extends [string, ...infer Rest] ? Rest extends string[] ? { [P in T[0]]: TupleToNestedObject<Rest, U> } : never : U;