import { ContinuationK, Read } from "@effect/core/stream/Channel/definition/primitives" /** * Reads an input and continue exposing both full error cause and completion. * * @tsplus static effect/core/stream/Channel.Ops readWithCause */ export function readWithCause< Env, Env1, Env2, InErr, InElem, InDone, OutErr, OutErr1, OutErr2, OutElem, OutElem1, OutElem2, OutDone, OutDone1, OutDone2 >( input: (i: InElem) => Channel, halt: ( e: Cause ) => Channel, done: (d: InDone) => Channel ): Channel< Env | Env1 | Env2, InErr, InElem, InDone, OutErr | OutErr1 | OutErr2, OutElem | OutElem1 | OutElem2, OutDone | OutDone1 | OutDone2 > { return new Read< Env | Env1 | Env2, InErr, InElem, InDone, OutErr | OutErr1 | OutErr2, OutElem | OutElem1 | OutElem2, OutDone | OutDone1 | OutDone2, InErr, InDone >( input, new ContinuationK< Env | Env1 | Env2, InErr, InElem, InDone, InErr, OutErr | OutErr1 | OutErr2, OutElem | OutElem1 | OutElem2, InDone, OutDone | OutDone1 | OutDone2 >(done, halt) ) }