ArrayToObject<T, K>:{ [P in T[K] as string]: Extract<T, Record<K, P>> }
A type to convert an array of objects with the key 'K' property to an object with the key 'K' property.
This is used to help typescript infer the type of the object when using the ArrayFinder function.
Type Parameters
T
K extends keyof T
Typeparam
T - The type of elements in the array.
Typeparam
K - The key of the property to be used as the key for accessing elements in the array.
A type to convert an array of objects with the key 'K' property to an object with the key 'K' property. This is used to help typescript infer the type of the object when using the
ArrayFinder
function.