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

Function found

packages/effect/src/ui/html/HtmlCommand.ts:58–68  ·  view source on GitHub ↗
(
  ref: Renderer.Ref<any>,
  f: (
    host: Context.Service.Shape<typeof Html.Host>,
    element: globalThis.Element
  ) => void
)

Source from the content-addressed store, hash-verified

56 : Html.Host.useSync((host) => Option.some(f(host, element.value))))
57
58const found = (
59 ref: Renderer.Ref<any>,
60 f: (
61 host: Context.Service.Shape<typeof Html.Host>,
62 element: globalThis.Element
63 ) => void
64): Effect.Effect<Found, never, Renderer.Refs | Html.Host> =>
65 Effect.map(
66 withElement(ref, f),
67 (done): Found => ({ found: Option.isSome(done) })
68 )
69
70const FocusOptionsSchema = Schema.Struct({
71 preventScroll: Schema.optional(Schema.Boolean)

Callers 1

HtmlCommand.tsFile · 0.70

Calls 2

withElementFunction · 0.85
mapMethod · 0.45

Tested by

no test coverage detected