import { In, Out, Predicate } from "../_interfaces"; import { Property } from "../Property"; /** * Filters Observable's values using the given predicate function. Supports * also filtering by `Property` - values are passed only when the property has * truthy value. * * @param predicateOrProperty Predicate function `x => boolean` or `Property` which is used to filter out value events * @param observable Source observable * @returns An `Observable` whose values pass the given predicate. * * @example * * // Filtering by predicate function * F.pipe(F.fromArray([1, 2, 3, 4]), * F.filter(x => x % 2 === 0), * F.log("Result")) * // logs: 2, 4, * * // Filtering by Property * const isLoading: Property = getLoading(document) * const clicksWhenNotLoading = * F.pipe(F.fromEvents(document.getElementById("myButton"), "click"), * F.filter(F.not(isLoading))) * * @public * @endomorphic */ export declare const filter: CurriedFilter; interface CurriedFilter { (predicateOrProperty: Predicate | Property, observable: In): Out; (predicateOrProperty: Predicate | Property): (observable: In) => Out; } export {};