import type { _E, _In, _L, _R, _Z } from "@effect/core/stream/Sink/definition/symbols" /** * @tsplus static effect/core/stream/Sink.Ops tuple */ export function tuple[]>( ...[s1, s2, ...sinks]: SN & { readonly 0: Sink readonly 1: Sink } ): Sink< [SN[number]] extends [{ [k in typeof _R]: () => infer R }] ? R : never, [SN[number]] extends [{ [k in typeof _E]: () => infer E }] ? E : never, [SN[number]] extends [{ [k in typeof _In]: (_: infer In) => void }] ? In : never, [SN[number]] extends [{ [k in typeof _L]: () => infer L }] ? L : never, { [K in keyof SN]: [SN[K]] extends [{ [k in typeof _Z]: () => infer Z }] ? Z : never } > { const init = (s1 as Sink).zipWith( s2 as Sink, (a, b) => [a, b] as const ) return sinks.reduce( (acc, v) => acc.zipWith(v, (a, b) => (a as readonly [any]).concat(b)), init ) }