import * as Chunk from "../Collections/Immutable/Chunk/core.js"; import { BackPressureStrategy, createQueue, makeBoundedQueue as makeBounded, unsafeCreateQueue as unsafeCreate } from "../Effect/excl-forEach.js"; import * as T from "./effect-api.js"; import type { Queue, XQueue } from "./xqueue.js"; export { createQueue, makeBounded, unsafeCreate, BackPressureStrategy }; /** * Creates a sliding queue */ export declare function makeSliding(capacity: number): T.UIO>; /** * Creates a unbouded queue */ export declare function makeUnbounded(): T.UIO>; /** * Creates a dropping queue */ export declare function makeDropping(capacity: number): T.UIO>; /** * Takes between min and max number of values from the queue. If there * is less than min items available, it'll block until the items are * collected. * * @ets_data_first takeBetween_ */ export declare function takeBetween(min: number, max: number): (self: XQueue) => T.Effect>; /** * Takes between min and max number of values from the queue. If there * is less than min items available, it'll block until the items are * collected. */ export declare function takeBetween_(self: XQueue, min: number, max: number): T.Effect>; /** * Creates a new queue from this queue and another. Offering to the composite queue * will broadcast the elements to both queues; taking from the composite queue * will dequeue elements from both queues and apply the function point-wise. * * Note that using queues with different strategies may result in surprising behavior. * For example, a dropping queue and a bounded queue composed together may apply `f` * to different elements. * * @ets_data_first bothWithM_ */ export declare function bothWithM(that: XQueue, f: (b: B, c: C) => T.Effect): (self: XQueue) => XQueue; /** * Creates a new queue from this queue and another. Offering to the composite queue * will broadcast the elements to both queues; taking from the composite queue * will dequeue elements from both queues and apply the function point-wise. * * Note that using queues with different strategies may result in surprising behavior. * For example, a dropping queue and a bounded queue composed together may apply `f` * to different elements. */ export declare function bothWithM_(self: XQueue, that: XQueue, f: (b: B, c: C) => T.Effect): XQueue; /** * Like `bothWithM`, but uses a pure function. * * @ets_data_first bothWith_ */ export declare function bothWith(that: XQueue, f: (b: B, c: C) => D): (self: XQueue) => XQueue; /** * Like `bothWithM`, but uses a pure function. */ export declare function bothWith_(self: XQueue, that: XQueue, f: (b: B, c: C) => D): XQueue; /** * Like `bothWith`, but tuples the elements instead of applying a function. * * @ets_data_first both_ */ export declare function both(that: XQueue): (self: XQueue) => XQueue; /** * Like `bothWith`, but tuples the elements instead of applying a function. */ export declare function both_(self: XQueue, that: XQueue): XQueue; /** * Transforms elements enqueued into and dequeued from this queue with the * specified effectual functions. * * @ets_data_first dimap_ */ export declare function dimap(f: (c: C) => A, g: (b: B) => D): (self: XQueue) => XQueue; /** * Transforms elements enqueued into and dequeued from this queue with the * specified effectual functions. */ export declare function dimap_(self: XQueue, f: (c: C) => A, g: (b: B) => D): XQueue; /** * Transforms elements enqueued into and dequeued from this queue with the * specified effectual functions. * * @ets_data_first dimapM_ */ export declare function dimapM(f: (c: C) => T.Effect, g: (b: B) => T.Effect): (self: XQueue) => XQueue; /** * Transforms elements enqueued into and dequeued from this queue with the * specified effectual functions. */ export declare function dimapM_(self: XQueue, f: (c: C) => T.Effect, g: (b: B) => T.Effect): XQueue; /** * Transforms elements enqueued into this queue with an effectful function. */ export declare function contramapM_(self: XQueue, f: (c: C) => T.Effect): XQueue; /** * Transforms elements enqueued into this queue with an effectful function. * * @ets_data_first contramapM_ */ export declare function contramapM(f: (c: C) => T.Effect): (self: XQueue) => XQueue; /** * Transforms elements enqueued into this queue with a pure function. */ export declare function contramap_(self: XQueue, f: (c: C) => A): XQueue; /** * Transforms elements enqueued into this queue with a pure function. * * @ets_data_first contramap_ */ export declare function contramap(f: (c: C) => A): (self: XQueue) => XQueue; /** * Like `filterInput`, but uses an effectful function to filter the elements. * * @ets_data_first filterInputM_ */ export declare function filterInputM(f: (_: A1) => T.Effect): (self: XQueue) => XQueue; /** * Like `filterInput`, but uses an effectful function to filter the elements. */ export declare function filterInputM_(self: XQueue, f: (_: A1) => T.Effect): XQueue; /** * Filters elements dequeued from the queue using the specified effectual * predicate. */ export declare function filterOutputM_(self: XQueue, f: (b: B) => T.Effect): XQueue; /** * Filters elements dequeued from the queue using the specified effectual * predicate. * * @ets_data_first filterOutputM_ */ export declare function filterOutputM(f: (b: B) => T.Effect): (self: XQueue) => XQueue; /** * Filters elements dequeued from the queue using the specified predicate. */ export declare function filterOutput_(self: XQueue, f: (b: B) => boolean): XQueue; /** * Filters elements dequeued from the queue using the specified predicate. * * @ets_data_first filterOutput_ */ export declare function filterOutput(f: (b: B) => boolean): (self: XQueue) => XQueue; /** * Applies a filter to elements enqueued into this queue. Elements that do not * pass the filter will be immediately dropped. * * @ets_data_first filterInput_ */ export declare function filterInput(f: (_: A1) => boolean): (self: XQueue) => XQueue; /** * Applies a filter to elements enqueued into this queue. Elements that do not * pass the filter will be immediately dropped. */ export declare function filterInput_(self: XQueue, f: (_: A1) => boolean): XQueue; /** * Transforms elements dequeued from this queue with a function. */ export declare function map_(self: XQueue, f: (b: B) => C): XQueue; /** * Transforms elements dequeued from this queue with a function. * * @ets_data_first map_ */ export declare function map(f: (b: B) => C): (self: XQueue) => XQueue; /** * Transforms elements dequeued from this queue with an effectful function. * * @ets_data_first mapM_ */ export declare function mapM(f: (b: B) => T.Effect): (self: XQueue) => XQueue; /** * Transforms elements dequeued from this queue with an effectful function. */ export declare function mapM_(self: XQueue, f: (b: B) => T.Effect): XQueue; /** * Take the head option of values in the queue. */ export declare function poll(self: XQueue): T.Effect; //# sourceMappingURL=api.d.ts.map