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

Function Screens

packages/effect/src/ui/RouterStack.ts:368–382  ·  view source on GitHub ↗
(
  h: View.HelperBase<Msg, unknown>,
  options: ScreensOptions<A, N>
)

Source from the content-addressed store, hash-verified

366 * @since 4.2.0
367 */
368export const Screens = <Msg, A, N extends View.Content<never, unknown>>(
369 h: View.HelperBase<Msg, unknown>,
370 options: ScreensOptions<A, N>
371): ReadonlyArray<View.Child<Msg, View.Requirements<N>>> => {
372 const Screen = screen ??= makeScreen()
373 const { entries } = options
374 const draw = options.screen as Draw
375 const top = entries.length - 1
376 return entries.map((entry, index) =>
377 Screen(h, {
378 key: String(entry.id),
379 props: { entry, covered: index < top, draw }
380 }) as View.Child<Msg, View.Requirements<N>>
381 )
382}

Callers

nothing calls this directly

Calls 4

makeScreenFunction · 0.85
ScreenInterface · 0.85
StringFunction · 0.50
mapMethod · 0.45

Tested by

no test coverage detected