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

Function elementOf

packages/effect/src/ui/View.ts:642–659  ·  view source on GitHub ↗
(
  builder: ElementBuilder<Msg, any, any, any>,
  children: ReadonlyArray<Node<Msg, any>>
)

Source from the content-addressed store, hash-verified

640}
641
642const elementOf = <Msg, R>(
643 builder: ElementBuilder<Msg, any, any, any>,
644 children: ReadonlyArray<Node<Msg, any>>
645): Element<Msg, R> => ({
646 _tag: "Element",
647 tag: builder.tag,
648 elementKey: builder.elementKey,
649 attrs: builder.owned.length === 0
650 ? builder.elementAttrs
651 : withTokens(builder.elementAttrs, builder.owned),
652 props: builder.elementProps,
653 handlers: builder.handlers,
654 eventOptions: builder.eventOptions,
655 refKey: builder.refKey,
656 mount: builder.mount,
657 owned: builder.owned,
658 children
659})
660
661/**
662 * What a builder's `forward` stores: a function from the finished builder

Callers 1

buildWithFunction · 0.70

Calls 1

withTokensFunction · 0.70

Tested by

no test coverage detected