import { type PrimativeKey, type ReadKeyFunction } from '../key'; import { type DecisionFunction } from '../value'; /** * Factory that creates a DecisionFunction using the input "selected" values. That function returns true if the value's key is considered to be included in the selected values. */ export type IsSelectedDecisionFunctionFactory = (selectedValues: Iterable) => DecisionFunction; /** * Configuration for {@link isSelectedDecisionFunctionFactory}. */ export interface IsSelectedDecisionFunctionConfig { /** * Reads the key from the input value. */ readonly readKey: ReadKeyFunction; /** * Default value to use if readKey returns no key. * * Defaults to false. */ readonly defaultIfKeyNull?: boolean; } /** * Creates an {@link IsSelectedDecisionFunctionFactory} that produces decision functions * checking whether a value's key is included in a set of selected values. * * @param config - Configuration with the key reader and default behavior. * @returns A factory that creates decision functions from a set of selected keys. * * @dbxUtil * @dbxUtilCategory set * @dbxUtilKind factory * @dbxUtilTags set, selection, decision, predicate, factory, key * @dbxUtilRelated is-in-set-decision-function * * @__NO_SIDE_EFFECTS__ */ export declare function isSelectedDecisionFunctionFactory(config: IsSelectedDecisionFunctionConfig): IsSelectedDecisionFunctionFactory;