effect/Sink#Sink: replacement: "Sink" note: "Interface kept as Sink with the same type parameters; the internal representation changed from a Channel wrapper to a `transform: (upstream: Pull>, scope) => Effect>` function, and completion is the tuple `Sink.End = readonly [value, leftover?]`." effect/Sink#Sink.Variance: replacement: "Sink.Variance" note: "Still exists as the namespace interface Sink.Variance (with Sink.VarianceStruct); the variance key is now the internal string \"~effect/Sink\" instead of the SinkTypeId symbol." effect/Sink#SinkTypeId: replacement: "none" note: "The type id is the unexported internal string \"~effect/Sink\" (no unique symbol, no export); use the new guard Sink.isSink(u) instead of checking the symbol." effect/Sink#SinkUnify: replacement: "SinkUnify" note: "Kept with the same name and shape (extends Effect.EffectUnify, preserves all five Sink type parameters)." effect/Sink#SinkUnifyIgnore: replacement: "SinkUnifyIgnore" note: "Kept with the same name; now a standalone `{ Effect?: true }` interface instead of extending Effect.EffectUnifyIgnore." effect/Sink#collectAll: replacement: "Sink.collect" note: "Renamed; returns Sink, In> collecting into a plain mutable Array instead of Chunk." effect/Sink#collectAllFrom: replacement: "none" note: "Repeated-run result accumulation was removed; checked the v4 export list (no collectAllFrom/repeatedly). Re-implement with Sink.fromTransform, looping self.transform on the upstream pull (feeding leftovers back) until the upstream ends, accumulating results in an array." effect/Sink#collectAllN: replacement: "Sink.take" note: "Sink.take(n) returns Sink, In, In> collecting up to n elements (Array instead of Chunk), emitting the unconsumed remainder as leftovers." effect/Sink#collectAllToMap: replacement: "Sink.reduce" note: "Built-in HashMap collector removed; build a plain Map in the reducer: Sink.reduce(() => new Map(), (m, in_) => { const k = key(in_); return m.set(k, m.has(k) ? merge(m.get(k)!, in_) : in_) })." effect/Sink#collectAllToMapN: replacement: "none" note: "Removed; approximating with Sink.reduceWhile((...) , (m) => m.size < n, ...) consumes (merges) the element that introduces the (n+1)-th key, whereas v3 left it as leftover — exact v3 leftover behavior needs a custom Sink.fromTransform that checks the key before consuming." effect/Sink#collectAllToSet: replacement: "Sink.reduce" note: "Built-in HashSet collector removed; build a plain Set: Sink.reduce(() => new Set(), (s, in_) => s.add(in_))." effect/Sink#collectAllToSetN: replacement: "Sink.reduceWhile" note: "Removed; equivalent via Sink.reduceWhile(() => new Set(), (s) => s.size < n, (s, in_) => s.add(in_)) — stops with leftovers once n distinct values are collected (plain Set instead of HashSet)." effect/Sink#collectAllUntil: replacement: "Sink.takeUntil" note: "Renamed; Sink.takeUntil(predicate) collects into Array until the predicate matches, including the matching element, like v3." effect/Sink#collectAllUntilEffect: replacement: "Sink.takeUntilEffect" note: "Renamed; Sink.takeUntilEffect(p) collects into Array until the effectful predicate returns true, including the matching element." effect/Sink#collectAllWhile: replacement: "Sink.takeWhile" note: "Renamed; Sink.takeWhile(predicate) collects the matching prefix into Array, keeps the refinement overload, and excludes the first failing element (returned via leftovers)." effect/Sink#collectAllWhileEffect: replacement: "Sink.takeWhileEffect" note: "Renamed; Sink.takeWhileEffect(p) collects into Array while the effectful predicate returns true." effect/Sink#collectAllWhileWith: replacement: "none" note: "Repeatedly-run-and-fold was removed (no v4 counterpart in the export list); re-implement with Sink.fromTransform looping self.transform while the `while` predicate holds on each result, folding results with `body` and feeding leftovers back into the next run." effect/Sink#collectLeftover: replacement: "Sink.mapEnd" note: "Use Sink.mapEnd to move the leftovers into the result: Sink.mapEnd(self, ([a, leftover]) => [[a, leftover ?? []] as const]); leftovers are NonEmptyReadonlyArray | undefined instead of Chunk." effect/Sink#context: replacement: "Sink.fromEffect(Effect.context())" note: "Sink.context was removed; Sink.fromEffect(Effect.context()) yields the same Sink, unknown, never, never, R>." effect/Sink#contextWith: replacement: "Sink.fromEffect(Effect.contextWith(f))" note: "Removed; compose Sink.fromEffect with Effect.contextWith to derive a value from the context." effect/Sink#contextWithEffect: replacement: "Sink.fromEffect(Effect.flatMap(Effect.context(), f))" note: "Removed, and v4 Effect has no contextWithEffect; use Sink.fromEffect(Effect.flatMap(Effect.context(), f))." effect/Sink#contextWithSink: replacement: "Sink.unwrap(Effect.contextWith(f))" note: "Removed; Sink.unwrap(Effect.contextWith((ctx: Context.Context) => f(ctx))) builds the sink from the context." effect/Sink#dieMessage: replacement: "Sink.die" note: "Removed (v4 has no RuntimeException-based dieMessage anywhere); use Sink.die(new Error(message))." effect/Sink#dieSync: replacement: "Sink.failCauseSync" note: "Removed; use Sink.failCauseSync(() => Cause.die(evaluate())) to defer defect evaluation, or Sink.die(defect) when eager is fine." effect/Sink#dimap: replacement: "Sink.mapInput + Sink.map" note: "Removed; compose the two halves: self.pipe(Sink.mapInput(f), Sink.map(g))." effect/Sink#dimapEffect: replacement: "Sink.mapInputEffect + Sink.mapEffect" note: "Removed; compose self.pipe(Sink.mapInputEffect(f), Sink.mapEffect(g))." effect/Sink#dimapChunks: replacement: "Sink.mapInputArray + Sink.map" note: "Removed; compose self.pipe(Sink.mapInputArray(f), Sink.map(g)) — f now maps NonEmptyReadonlyArray instead of Chunk and must return a non-empty array." effect/Sink#dimapChunksEffect: replacement: "Sink.mapInputArrayEffect + Sink.mapEffect" note: "Removed; compose self.pipe(Sink.mapInputArrayEffect(f), Sink.mapEffect(g)) — f maps NonEmptyReadonlyArray instead of Chunk and must return a non-empty array." effect/Sink#drop: replacement: "none" note: "The drop* sinks were removed (nothing in the v4 export list); drop on the stream side instead with Stream.drop(n) before running the sink, or write a Sink.fromTransform that discards the first n pulled elements." effect/Sink#dropUntil: replacement: "none" note: "Removed with the other drop* sinks; use Stream.dropUntil(predicate) on the stream before running the sink." effect/Sink#dropUntilEffect: replacement: "none" note: "Removed; use Stream.dropUntilEffect(p) on the stream before running the sink." effect/Sink#dropWhile: replacement: "none" note: "Removed; use Stream.dropWhile(predicate) on the stream before running the sink." effect/Sink#dropWhileEffect: replacement: "none" note: "Removed; use Stream.dropWhileEffect(p) on the stream before running the sink." effect/Sink#ensuringWith: replacement: "Sink.onExit" note: "Renamed; Sink.onExit(self, (exit: Exit) => finalizer) runs after completion, failure, or interruption — the exit now carries the sink's result value A (v3 passed Exit). Plain Sink.ensuring(effect) also still exists for the exit-independent case." effect/Sink#filterInput: replacement: "none" note: "Removed, and not expressible via Sink.mapInputArray because its function must return a non-empty array (a fully-filtered batch is illegal); filter on the stream with Stream.filter(predicate) before running the sink, or write a Sink.fromTransform that skips empty filtered batches." effect/Sink#filterInputEffect: replacement: "none" note: "Removed (same non-empty-array constraint as filterInput); use Stream.filterEffect(p) on the stream before running the sink." effect/Sink#foldChunks: replacement: "Sink.reduceWhileArray" note: "Sink.reduceWhileArray(() => s, contFn, f) folds whole input batches; initial state is now a lazy thunk and f receives NonEmptyReadonlyArray instead of Chunk." effect/Sink#foldChunksEffect: replacement: "Sink.reduceWhileArrayEffect" note: "Sink.reduceWhileArrayEffect(() => s, contFn, f) is the effectful array-level fold with continuation predicate; lazy initial state, NonEmptyReadonlyArray instead of Chunk. Sink.foldArray has the same shape but does not check contFn on the initial state." effect/Sink#foldEffect: replacement: "Sink.reduceWhileEffect" note: "Sink.reduceWhileEffect(() => s, contFn, f) folds element-by-element with an effectful step and continuation predicate (checked on the initial state, like v3); initial state is now a lazy thunk. v4 Sink.fold has the same signature but skips the initial-state check." effect/Sink#foldLeft: replacement: "Sink.reduce" note: "Renamed; Sink.reduce(() => s, f) — initial state is now a lazy thunk, semantics otherwise identical." effect/Sink#foldLeftChunks: replacement: "Sink.reduceArray" note: "Renamed; Sink.reduceArray(() => s, f) folds whole batches — lazy initial state, f receives NonEmptyReadonlyArray instead of Chunk." effect/Sink#foldLeftChunksEffect: replacement: "Sink.reduceWhileArrayEffect" note: "No plain reduceArrayEffect exists in v4; use Sink.reduceWhileArrayEffect(() => s, () => true, f) (constant-true predicate) — f receives NonEmptyReadonlyArray instead of Chunk and the result has L = never like v3." effect/Sink#foldLeftEffect: replacement: "Sink.reduceEffect" note: "Renamed; Sink.reduceEffect(() => s, f) — lazy initial state, effectful step, no termination predicate." effect/Sink#foldSink: replacement: "Sink.orElse + Sink.flatMap" note: "The two-channel match was removed; compose self.pipe(Sink.orElse((e) => options.onFailure(e)), Sink.flatMap((a) => options.onSuccess(a))) — orElse switches to the failure sink (resuming the same upstream), flatMap feeds leftovers to the success sink first." effect/Sink#foldUntilEffect: replacement: "Sink.foldUntil" note: "v4 Sink.foldUntil(() => s, max, f) takes the effectful step function directly (f returns Effect), so it covers v3 foldUntilEffect; initial state is now a lazy thunk. For the pure v3 foldUntil wrap the step in Effect.succeed." effect/Sink#foldWeighted: replacement: "none" note: "The whole foldWeighted family was removed from v4 Sink (checked the export list); re-implement with Sink.fold carrying the accumulated cost in the state (cont while cost < max), returning leftovers automatically when stopping mid-batch." effect/Sink#foldWeightedDecompose: replacement: "none" note: "Removed with no decompose mechanism in v4; splitting oversized elements must happen upstream (transform the stream before the sink) or inside a custom Sink.fromTransform." effect/Sink#foldWeightedDecomposeEffect: replacement: "none" note: "Removed; same as foldWeightedDecompose — no effectful weighted/decompose fold exists, re-implement via Sink.fromTransform or restructure upstream." effect/Sink#foldWeightedEffect: replacement: "none" note: "Removed; re-implement with Sink.fold (its step is effectful in v4) tracking accumulated cost in the state." effect/Sink#forEachChunk: replacement: "Sink.forEachArray" note: "Renamed; f receives NonEmptyReadonlyArray instead of Chunk." effect/Sink#forEachChunkWhile: replacement: "Sink.forEachWhileArray" note: "Renamed; f: (NonEmptyReadonlyArray) => Effect continues while true, stops on false, as in v3." effect/Sink#fromPush: replacement: "Sink.fromTransform" note: "The push-based protocol (Option push function failing with [Either, leftovers]) is gone; v4's low-level constructor is pull-based: Sink.fromTransform((upstream: Pull>, scope) => Effect>) — pull inputs from upstream and finish by succeeding with the [value, leftover?] tuple." effect/Sink#leftover: replacement: "Sink.succeed" note: "Removed as a standalone constructor; Sink.succeed now takes optional leftovers: Sink.succeed(void 0, leftovers) where leftovers is a NonEmptyReadonlyArray instead of Chunk." effect/Sink#mapInputChunks: replacement: "Sink.mapInputArray" note: "Renamed; f maps NonEmptyReadonlyArray => NonEmptyReadonlyArray (must stay non-empty) instead of Chunk => Chunk." effect/Sink#mapInputChunksEffect: replacement: "Sink.mapInputArrayEffect" note: "Renamed; f maps NonEmptyReadonlyArray => Effect> (must stay non-empty) instead of Chunk => Effect." effect/Sink#mkString: replacement: "Sink.reduceArray" note: "Removed as a built-in; equivalent one-liner: Sink.reduceArray(() => \"\", (s, arr) => s + arr.join(\"\"))." effect/Sink#race: replacement: "none" note: "Sink racing (race/raceBoth/raceWith) was removed from v4; broadcast the stream (Stream.broadcast) into two consumers and race the resulting run effects with Effect.race, or write a custom Channel." effect/Sink#raceBoth: replacement: "none" note: "Removed with the race family; broadcast the stream and tag each Stream.run effect's result before combining them with Effect.race to learn which side succeeded first." effect/Sink#raceWith: replacement: "none" note: "Removed, along with the MergeDecision type it depended on; broadcast the stream and combine the two run effects manually. Use Effect.race for the first success or Effect.raceFirst for the first completion; custom completion and interruption handling requires explicit fibers." effect/Sink#refineOrDie: replacement: "Sink.catch" note: "Removed; rebuild with the typed-error handler: Sink.catch(self, (e) => Option.match(pf(e), { onSome: Effect.fail, onNone: () => Effect.die(e) })) — note Sink.catch replaces the result on recovery, so refined errors must be re-failed as shown." effect/Sink#refineOrDieWith: replacement: "Sink.catch" note: "Removed; same pattern as refineOrDie but die with the mapped defect: Sink.catch(self, (e) => Option.match(pf(e), { onSome: Effect.fail, onNone: () => Effect.die(f(e)) }))." effect/Sink#splitWhere: replacement: "none" note: "Removed; it re-chunked input so the sink stopped before the first later element matching the predicate — closest v4 options are pre-splitting the stream (Stream.split / Stream.takeWhile) or a custom Sink.fromTransform that cuts pulled arrays at the predicate boundary and returns the rest as leftovers." effect/Sink#unwrapScoped: replacement: "Sink.unwrap" note: "Folded into Sink.unwrap, whose signature now excludes Scope from R (Sink<..., Exclude | R2>), so scoped effects are accepted directly; resources stay open for the sink's lifetime." effect/Sink#unwrapScopedWith: replacement: "Sink.unwrap" note: "Folded into Sink.unwrap — obtain the scope inside the effect via Effect.scope (Sink.unwrap(Effect.flatMap(Effect.scope, f))); for direct scope access use Sink.fromTransform, whose transform receives (upstream, scope)." effect/Sink#zip: replacement: "Sink.flatMap" note: "The zip family was removed; sequential zip is self.pipe(Sink.flatMap((a) => Sink.map(that, (a2) => [a, a2] as const))) — leftovers of the first sink feed the second. The { concurrent: true } racing mode has no v4 equivalent." effect/Sink#zipLeft: replacement: "Sink.flatMap" note: "Removed; use self.pipe(Sink.flatMap((a) => Sink.as(that, a))) to run both sequentially and keep the first result (no concurrent option)." effect/Sink#zipRight: replacement: "Sink.flatMap" note: "Removed; use self.pipe(Sink.flatMap(() => that)) to run both sequentially and keep the second result (no concurrent option)." effect/Sink#zipWith: replacement: "Sink.flatMap" note: "Removed; use self.pipe(Sink.flatMap((a) => Sink.map(that, (a2) => f(a, a2)))) — sequential only, the { concurrent: true } option has no v4 equivalent."