import { Accessor } from 'solid-js'; import { MaybeAccessor } from '../utils/types.js'; import 'solid-js/types/reactive/signal'; type UseArrayReducer = (previousValue: PV, currentValue: CV, currentIndex: number) => R; /** * Reactive `Array.reduce` * * @see https://solidjs-use.github.io/solidjs-use/shared/useArrayReduce * @param {Array} list - the array was called upon. * @param reducer - a "reducer" function. * * @returns the value that results from running the "reducer" callback function to completion over the entire array. */ declare function useArrayReduce(list: MaybeAccessor>>, reducer: UseArrayReducer): Accessor; /** * Reactive `Array.reduce` * * @see https://solidjs-use.github.io/solidjs-use/shared/useArrayReduce * @param {Array} list - the array was called upon. * @param reducer - a "reducer" function. * @param initialValue - a value to be initialized the first time when the callback is called. * * @returns the value that results from running the "reducer" callback function to completion over the entire array. */ declare function useArrayReduce(list: MaybeAccessor>>, reducer: UseArrayReducer, initialValue: MaybeAccessor): Accessor; export { UseArrayReducer, useArrayReduce };