18 lines · 593 B · TypeScript
RawDownload
import { Effect, Layer, PubSub, Stream } from "effect"; import {  RuntimeReceiptBus,  type RuntimeReceiptBusShape,  type OrchestrationRuntimeReceipt,} from "../Services/RuntimeReceiptBus.ts"; const makeRuntimeReceiptBus = Effect.gen(function* () {  const pubSub = yield* PubSub.unbounded<OrchestrationRuntimeReceipt>();   return {    publish: (receipt) => PubSub.publish(pubSub, receipt).pipe(Effect.asVoid),    stream: Stream.fromPubSub(pubSub),  } satisfies RuntimeReceiptBusShape;}); export const RuntimeReceiptBusLive = Layer.effect(RuntimeReceiptBus, makeRuntimeReceiptBus);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t