MCPcopy Create free account
hub / github.com/Effect-TS/effect / withForward

Function withForward

packages/effect/src/ui/View.ts:745–754  ·  view source on GitHub ↗
(
  builder: B,
  place: Forward
)

Source from the content-addressed store, hash-verified

743 * @internal
744 */
745export const withForward = <B extends ElementBuilder<any, any, any, any>>(
746 builder: B,
747 place: Forward
748): B => {
749 const out = copyBuilder(builder) as Mutable<B>
750 const layer = builder[partForwardLayer]
751 const hook = layer === undefined ? place : forwardInPart(place, layer)
752 out.hooks = builder.hooks === undefined ? [hook] : [...builder.hooks, hook]
753 return out
754}
755
756/**
757 * A copy of `builder` with `inputs` after the children it already holds,

Callers 1

forwardMethod · 0.85

Calls 2

copyBuilderFunction · 0.85
forwardInPartFunction · 0.85

Tested by

no test coverage detected