import * as Tp from "../../../Collections/Immutable/Tuple";
import * as T from "../../../Effect";
import type { Stream } from "./core";
export declare type SortedByKey<R, E, K, A> = Stream<R, E, Tp.Tuple<[K, A]>>;
export declare type KeyComparator<K> = (k1: K, k2: K) => number;
/**
 * Zips this stream that is sorted by distinct keys and the specified
 * stream that is sorted by distinct keys to produce a new stream that is
 * sorted by distinct keys. Uses the functions `left`, `right`, and `both`
 * to handle the cases where a key and value exist in this stream, that
 * stream, or both streams.
 *
 * This allows zipping potentially unbounded streams of data by key in
 * constant space but the caller is responsible for ensuring that the
 * streams are sorted by distinct keys.
 *
 * The execution strategy `exec` will be used to determine whether to pull
 * from the streams sequentially or in parallel.
 */
export declare function zipAllSortedByKeyWithExec_<R, R1, E, E1, K, A, B, C1, C2, C3>(self: SortedByKey<R, E, K, A>, that: SortedByKey<R1, E1, K, B>, left: (a: A) => C1, right: (b: B) => C2, both: (a: A, b: B) => C3, comparator: KeyComparator<K>, exec: T.ExecutionStrategy): Stream<R & R1, E | E1, Tp.Tuple<[K, C1 | C2 | C3]>>;
/**
 * Zips this stream that is sorted by distinct keys and the specified
 * stream that is sorted by distinct keys to produce a new stream that is
 * sorted by distinct keys. Uses the functions `left`, `right`, and `both`
 * to handle the cases where a key and value exist in this stream, that
 * stream, or both streams.
 *
 * This allows zipping potentially unbounded streams of data by key in
 * constant space but the caller is responsible for ensuring that the
 * streams are sorted by distinct keys.
 *
 * The execution strategy `exec` will be used to determine whether to pull
 * from the streams sequentially or in parallel.
 *
 * @ets_data_first zipAllSortedByKeyWithExec_
 */
export declare function zipAllSortedByKeyWithExec<R1, E1, K, A, B, C1, C2, C3>(that: SortedByKey<R1, E1, K, B>, left: (a: A) => C1, right: (b: B) => C2, both: (a: A, b: B) => C3, comparator: KeyComparator<K>, exec: T.ExecutionStrategy): <R, E>(self: SortedByKey<R, E, K, A>) => Stream<R & R1, E1 | E, Tp.Tuple<[K, C1 | C2 | C3]>>;
/**
 * Zips this stream that is sorted by distinct keys and the specified
 * stream that is sorted by distinct keys to produce a new stream that is
 * sorted by distinct keys. Uses the functions `left`, `right`, and `both`
 * to handle the cases where a key and value exist in this stream, that
 * stream, or both streams.
 *
 * This allows zipping potentially unbounded streams of data by key in
 * constant space but the caller is responsible for ensuring that the
 * streams are sorted by distinct keys.
 */
export declare function zipAllSortedByKeyWith_<R, R1, E, E1, K, A, B, C1, C2, C3>(self: SortedByKey<R, E, K, A>, that: SortedByKey<R1, E1, K, B>, left: (a: A) => C1, right: (b: B) => C2, both: (a: A, b: B) => C3, comparator: KeyComparator<K>): Stream<R & R1, E | E1, Tp.Tuple<[K, C1 | C2 | C3]>>;
/**
 * Zips this stream that is sorted by distinct keys and the specified
 * stream that is sorted by distinct keys to produce a new stream that is
 * sorted by distinct keys. Uses the functions `left`, `right`, and `both`
 * to handle the cases where a key and value exist in this stream, that
 * stream, or both streams.
 *
 * This allows zipping potentially unbounded streams of data by key in
 * constant space but the caller is responsible for ensuring that the
 * streams are sorted by distinct keys.
 *
 * @ets_data_first zipAllSortedByKeyWith_
 */
export declare function zipAllSortedByKeyWith<R1, E1, K, A, B, C1, C2, C3>(that: SortedByKey<R1, E1, K, B>, left: (a: A) => C1, right: (b: B) => C2, both: (a: A, b: B) => C3, comparator: KeyComparator<K>): <R, E>(self: SortedByKey<R, E, K, A>) => Stream<R & R1, E1 | E, Tp.Tuple<[K, C1 | C2 | C3]>>;
/**
 * Zips this stream that is sorted by distinct keys and the specified
 * stream that is sorted by distinct keys to produce a new stream that is
 * sorted by distinct keys. Keeps only values from that stream, using the
 * specified value `default` to fill in missing values.
 *
 * This allows zipping potentially unbounded streams of data by key in
 * constant space but the caller is responsible for ensuring that the
 * streams are sorted by distinct keys.
 */
export declare function zipAllSortedByKeyRight_<R, R1, E, E1, K, A, B>(self: SortedByKey<R, E, K, A>, that: Stream<R1, E1, Tp.Tuple<[K, B]>>, default_: B, comparator: KeyComparator<K>): Stream<R & R1, E | E1, Tp.Tuple<[K, B]>>;
/**
 * Zips this stream that is sorted by distinct keys and the specified
 * stream that is sorted by distinct keys to produce a new stream that is
 * sorted by distinct keys. Keeps only values from that stream, using the
 * specified value `default` to fill in missing values.
 *
 * This allows zipping potentially unbounded streams of data by key in
 * constant space but the caller is responsible for ensuring that the
 * streams are sorted by distinct keys.
 *
 * @ets_data_first zipAllSortedByKeyRight_
 */
export declare function zipAllSortedByKeyRight<R1, E1, K, A, B>(that: Stream<R1, E1, Tp.Tuple<[K, B]>>, default_: B, comparator: KeyComparator<K>): <R, E>(self: SortedByKey<R, E, K, A>) => Stream<R & R1, E1 | E, Tp.Tuple<[K, B]>>;
/**
 * Zips this stream that is sorted by distinct keys and the specified
 * stream that is sorted by distinct keys to produce a new stream that is
 * sorted by distinct keys. Keeps only values from this stream, using the
 * specified value `default` to fill in missing values.
 *
 * This allows zipping potentially unbounded streams of data by key in
 * constant space but the caller is responsible for ensuring that the
 * streams are sorted by distinct keys.
 */
export declare function zipAllSortedByKeyLeft_<R, R1, E, E1, K, A, B>(self: SortedByKey<R, E, K, A>, that: Stream<R1, E1, Tp.Tuple<[K, B]>>, default_: A, comparator: KeyComparator<K>): Stream<R & R1, E | E1, Tp.Tuple<[K, A]>>;
/**
 * Zips this stream that is sorted by distinct keys and the specified
 * stream that is sorted by distinct keys to produce a new stream that is
 * sorted by distinct keys. Keeps only values from this stream, using the
 * specified value `default` to fill in missing values.
 *
 * This allows zipping potentially unbounded streams of data by key in
 * constant space but the caller is responsible for ensuring that the
 * streams are sorted by distinct keys.
 *
 * @ets_data_first zipAllSortedByKeyLeft_
 */
export declare function zipAllSortedByKeyLeft<R1, E1, K, A, B>(that: Stream<R1, E1, Tp.Tuple<[K, B]>>, default_: A, comparator: KeyComparator<K>): <R, E>(self: SortedByKey<R, E, K, A>) => Stream<R & R1, E1 | E, Tp.Tuple<[K, A]>>;
/**
 * Zips this stream that is sorted by distinct keys and the specified
 * stream that is sorted by distinct keys to produce a new stream that is
 * sorted by distinct keys. Combines values associated with each key into a
 * tuple, using the specified values `defaultLeft` and `defaultRight` to
 * fill in missing values.
 *
 * This allows zipping potentially unbounded streams of data by key in
 * constant space but the caller is responsible for ensuring that the
 * streams are sorted by distinct keys.
 */
export declare function zipAllSortedByKey_<R, R1, E, E1, K, A, B>(self: SortedByKey<R, E, K, A>, that: Stream<R1, E1, Tp.Tuple<[K, B]>>, defaultLeft: A, defaultRight: B, comparator: KeyComparator<K>): Stream<R & R1, E | E1, Tp.Tuple<[K, Tp.Tuple<[A, B]>]>>;
/**
 * Zips this stream that is sorted by distinct keys and the specified
 * stream that is sorted by distinct keys to produce a new stream that is
 * sorted by distinct keys. Combines values associated with each key into a
 * tuple, using the specified values `defaultLeft` and `defaultRight` to
 * fill in missing values.
 *
 * This allows zipping potentially unbounded streams of data by key in
 * constant space but the caller is responsible for ensuring that the
 * streams are sorted by distinct keys.
 *
 * @ets_data_first zipAllSortedByKey_
 */
export declare function zipAllSortedByKey<R1, E1, K, A, B>(that: Stream<R1, E1, Tp.Tuple<[K, B]>>, defaultLeft: A, defaultRight: B, comparator: KeyComparator<K>): <R, E>(self: SortedByKey<R, E, K, A>) => Stream<R & R1, E1 | E, Tp.Tuple<[K, Tp.Tuple<[A, B]>]>>;
//# sourceMappingURL=SortedByKey.d.ts.map