declare enum MatchPolicy { RegExp = "RegExp", Equal = "Equal", EqualIgnoreCase = "EqualIgnoreCase" } interface Options { filterKey?: string; valueKey?: string; matchPolicies?: { [index: string]: MatchPolicy; }; defaultValue?: any; } /** * @description * Get 1st-matched value from a collection of filter/value objects for a target object. * @param {Array<{[index:string]:any}>} objCollection * An array of objects, each of which contains a set of filter/value. * @param {{[index:string]:any}} targetObj * The target object to match * @param {Options} [options] * Match options * @param {string} [options.filterKey] * The key of the filter (default: "filter"). * @param {string} [options.valueKey] * The key of the value that determines the return value, * - `string`: the `valueKey`-indexed part of the matched object will be returned. * - `undefined`: the whole matched object will be returned. * @param {Object} [options.matchPolicies] * The match policy for some filter properties. * - `MatchPolicy.Equal`: equal value (default) * - `MatchPolicy.RegExp`: regular expression (only applicable for `string`) * @param {Object} [options.defaultValue] * The return value when no candidate matches. * @returns any */ declare function configFilter(objCollection: Array<{ [index: string]: any; }>, targetObj: { [index: string]: any; }, options?: Options): any; export { Options as FilterOptions, MatchPolicy, configFilter };