Files
anomalyco_opencode/packages/plugin/src/v2/effect/event.ts
T
2026-06-21 08:05:49 -04:00

11 lines
287 B
TypeScript

import type { Event as SDKEvent } from "@opencode-ai/sdk/v2/types"
import type { Stream } from "effect"
export type EventMap = {
[Item in SDKEvent as Item["type"]]: Item
}
export interface Event {
subscribe<Type extends keyof EventMap>(type: Type): Stream.Stream<EventMap[Type]>
}