/** * Spec where each key maps to a predicate function. */ export type WhereSpec = { [K in keyof T]?: (value: T[K]) => boolean; }; /** * Create a predicate function that tests if an object matches a spec. * Each property in the spec is a predicate that the corresponding object property must satisfy. * * @param spec - Object where values are predicate functions * @returns Predicate function * * @example * const isAdult = whereFast({ age: n => n >= 18 }); * isAdult({ name: 'alice', age: 25 }); // true * isAdult({ name: 'bob', age: 15 }); // false * * @example * users.filter(whereFast({ active: Boolean, role: r => r === 'admin' })); */ export declare function whereFast(spec: WhereSpec): (obj: T) => boolean; /** * Create a predicate function that tests if an object has properties equal to the spec values. * Simpler version of whereFast for exact equality checks. * * @param spec - Object with expected property values * @returns Predicate function * * @example * const isAdmin = whereEqFast({ role: 'admin', active: true }); * isAdmin({ role: 'admin', active: true, name: 'alice' }); // true * isAdmin({ role: 'user', active: true }); // false */ export declare function whereEqFast(spec: Partial): (obj: T) => boolean; //# sourceMappingURL=where.d.ts.map