UNPKG

@autobe/agent

Version:

AI backend server code generator

18 lines (17 loc) 713 B
/** * Converts an array of key-value pairs (entries) into a Record. * * @param entries - Array of [key, value] tuples * @returns Record object from the entries */ export declare function arrayToRecord<V>(entries: Array<[string, V]>): Record<string, V>; /** * Converts an array of objects into a Record using specified key and value * properties. * * @param items - Array of items to convert * @param keyProp - Property name to use as the key * @param valueProp - Property name to use as the value * @returns Record object with the extracted key-value pairs */ export declare function arrayToRecord<T, K extends keyof T, V extends keyof T>(items: T[], keyProp: K, valueProp: V): Record<string, T[V]>;