import { Lazy } from 'fp-ts/lib/function'; import { Task } from 'fp-ts/lib/Task'; import { AsyncStream } from '../uri'; /** * Less strict version of {@link match}. * * @export * @template B The type of the value on empty. * @template A The type of the streamed value. * @template C The type of the value on non-empty. * @param {Lazy | Task} onEmpty The lazy function that will be executed * if the async stream is empty. * * @param {(fa: AsyncStream) => C | Promise} onNonEmpty The function that * will be executed if the async stream is not empty. * * @return {(fa: AsyncStream) => Task} A function that takes an * async stream to match. * * @category pattern matching * @__PURE__ */ export declare function matchW(onEmpty: Lazy | Task, onNonEmpty: (fa: AsyncStream) => C | Promise): (fa: AsyncStream) => Task; /** * Matches an {@link AsyncStream} whether if that was empty or not. * * @export * @template B The type of the value on empty. * @template A The type of the streamed value. * @param {Lazy | Task} onEmpty The lazy function that will be executed * if the async stream is empty. * * @param {(fa: AsyncStream) => Promise} onNonEmpty The function that will * be executed. * * @return {(fa: AsyncStream) => Promise} A function that takes an * async stream to match. * * @category pattern matching * @__PURE__ */ export declare function match(onEmpty: Lazy | Task, onNonEmpty: (fa: AsyncStream) => B | Promise): (fa: AsyncStream) => Task;