import { type SetIncludesMode } from '../set/set.mode'; /** * Predicate function that tests an individual array element, similar to the callback used by {@link Array.prototype.find} or {@link Array.prototype.filter}. */ export type ArrayFindDecisionFunction = (value: T, index: number, obj: T[]) => boolean; /** * Preconfigured function that evaluates an array and returns whether its elements satisfy a decision criterion based on a {@link SetIncludesMode}. */ export type ArrayDecisionFunction = (values: T[]) => boolean; /** * Creates an {@link ArrayDecisionFunction} from a per-element predicate and a {@link SetIncludesMode}. * * When mode is `'any'`, the resulting function returns `true` if at least one element satisfies the predicate. * When mode is `'all'`, it returns `true` only if every element satisfies the predicate. * * @param decision - Predicate used to test individual elements. * @param mode - Whether all or any elements must satisfy the predicate. * @returns A function that evaluates an array against the configured decision criteria. */ export declare function arrayDecisionFunction(decision: ArrayFindDecisionFunction, mode: SetIncludesMode): ArrayDecisionFunction; /** * Convenience wrapper that creates and immediately invokes an {@link ArrayDecisionFunction}. * * @param values - Array to evaluate. * @param decision - Predicate used to test individual elements. * @param mode - Whether all or any elements must satisfy the predicate. * @returns `true` if the array satisfies the decision criteria for the given mode. */ export declare function arrayDecision(values: T[], decision: ArrayFindDecisionFunction, mode: SetIncludesMode): boolean;