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

Function emit

packages/effect/src/Stream.ts:1539–1542  ·  view source on GitHub ↗
(event: any)

Source from the content-addressed store, hash-verified

1537 const once = typeof options === "object" && options.once
1538
1539 function emit(event: any) {
1540 Queue.offerUnsafe(queue, event)
1541 if (once) Queue.endUnsafe(queue)
1542 }
1543 return Effect.acquireRelease(
1544 Effect.sync(() => target.addEventListener(type, emit, options)),
1545 () => Effect.sync(() => target.removeEventListener(type, emit, options))

Calls 1

offerUnsafeMethod · 0.80

Tested by

no test coverage detected