import { Task } from 'fp-ts/lib/Task';
import { Stream } from '../Stream/uri';
import { AsyncStream } from './uri';
/**
* Converts an {@link AsyncStream} of type `A` to an array of `A`.
*
* @export
* @template A The value type.
* @param {AsyncStream} fa The async stream source.
* @return {Promise} The async stream items as an array.
*
* @__PURE__
*/
export declare function toArray(fa: AsyncStream): Promise;
/**
* Converts an iterable to an {@link AsyncStream} of type `A`.
*
* @export
* @template A The value type.
* @param {Iterable} a The iterable input of `A` values.
* @return {AsyncStream} A async stream of of the values found in the given
* iterable.
*
* @__PURE__
*/
export declare function fromIterable(a: Iterable): AsyncStream;
/**
* Converts an iterable to an {@link AsyncStream} of type `A`.
*
* @export
* @template A The value type.
* @param {AsyncIterable} a The iterable input of `A` values.
* @return {AsyncStream} A async stream of of the values found in the given
* iterable.
*
* @__PURE__
*/
export declare function fromAsyncIterable(a: AsyncIterable): AsyncStream;
/**
* Creates an {@link AsyncStream} from an iterable of {@link Promise}s.
*
* Yields elements at when a promise in the iterable is resolved. Therefore,
* the elements might not be in-order.
*
* If the order is important, use {@link fromPromisesSeq}.
*
* @export
* @template A The value type.
* @param {Iterable>} input The input promises.
* @return {AsyncStream} An async stream output.
*
* @__PURE__
*/
export declare function fromPromises(input: Iterable>): AsyncStream;
/**
* Similar to {@link fromPromises} but the order is preserved.
*
* @export
* @template A The value type.
* @param {Iterable>} input The input promises.
* @return {AsyncStream} The async stream output.
*
* @__PURE__
*/
export declare function fromPromisesSeq(input: Iterable>): AsyncStream;
/**
* Converts an {@link AsyncStream} to a {@link Task} of the array of
* the elements.
*
* @export
* @template A The value type.
* @param {AsyncStream} fa The input async stream.
* @return {Task} The output task.
*
* @__PURE__
*/
export declare function toTask(fa: AsyncStream): Task;
/**
* Converts an {@link AsyncStream} to a {@link Task} of a {@link Stream} of the
* elements.
*
* @export
* @template A The value type.
* @param {AsyncStream} fa The input async stream.
* @return {Task>} The output stream task.
*
* @__PURE__
*/
export declare function toStream(fa: AsyncStream): Task>;