quantitivecalc
Version:
A TypeScript library providing advanced quantitative finance functions for risk analysis, performance metrics, and technical indicators. (Currently in development)
12 lines • 751 B
TypeScript
/**
* Applies a provided function to each array value in a dictionary and returns a new dictionary
* with the same keys and the results of the function as values.
*
* @template T - The type of elements in the input arrays.
* @template R - The type of the result returned by the function.
* @param dict - A dictionary where each value is an array of type T.
* @param func - A function that takes an array of type T and returns a value of type R.
* @returns A new dictionary with the same keys as `dict`, where each value is the result of applying `func` to the corresponding array.
*/
export default function applyFunction<T, R>(dict: Record<string, T[]>, func: (list: T[]) => R): Record<string, R>;
//# sourceMappingURL=applyFunction.d.ts.map