MultiLoader-Template/node_modules/es-toolkit/dist/math/sum.d.mts
3944Realms 768f38fc97 feat: 可使用的构建模板
修改了脚本,使其可以推给Maven仓库
2026-05-03 13:02:19 +08:00

17 lines
460 B
TypeScript

/**
* Calculates the sum of an array of numbers.
*
* This function takes an array of numbers and returns the sum of all the elements in the array.
*
* @param {number[]} nums - An array of numbers to be summed.
* @returns {number} The sum of all the numbers in the array.
*
* @example
* const numbers = [1, 2, 3, 4, 5];
* const result = sum(numbers);
* // result will be 15
*/
declare function sum(nums: readonly number[]): number;
export { sum };