import { Either } from 'fp-ts/lib/Either';
import { Filterable1 } from 'fp-ts/lib/Filterable';
import { FilterableWithIndex1, RefinementWithIndex } from 'fp-ts/lib/FilterableWithIndex';
import { Option } from 'fp-ts/lib/Option';
import { Refinement } from 'fp-ts/lib/Refinement';
import { Separated } from 'fp-ts/lib/Separated';
import { AsyncStream, URI } from './uri';
import { AsyncPredicate, AsyncPredicateWithIndex } from './utils/async-predicate';
import { MaybeAsync } from './utils/maybe-async';
/**
* Returns an {@link AsyncStream} that produces values that passes from the
* refinement function.
*
* @export
* @template A The value type.
* @template B The refined output value type.
* @param {Refinement} refinement The refinement function.
* @return {(fa: AsyncStream) => AsyncStream} A function that takes an
* async stream and returns another async stream passing the filter.
*
* @category filtering
* @__PURE__
*/
export declare function filter(refinement: Refinement): (fa: AsyncStream) => AsyncStream;
/**
* Returns an {@link AsyncStream} that produces values that passes from the
* predicate function.
*
* @export
* @template A The value type.
* @param {AsyncPredicate} predicate The predicate function.
* @return {(fa: AsyncStream) => AsyncStream} A function
* that takes an async stream and returns another async stream passing the
* filter.
*
* @category filtering
* @__PURE__
*/
export declare function filter(predicate: AsyncPredicate): (fa: AsyncStream) => AsyncStream;
/**
* Maps an {@link AsyncStream} with an iterating function that takes the
* index and the value of each element and returns an {@link Option}.
*
* It keeps only the `Some` values dicarding the `None`s.
*
* Same as [`filterMap`](#filterMap), but with an iterating function which takes
* also the index as input.
*
* @export
* @template A The value type.
* @template B The mapped type.
* @param {(i: number, a: A) => Option | Promise