Download packages/plugin/src/v2/effect/event.ts from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 287 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/plugin/src/v2/effect/event.ts
- Command line
-
hf download hf://SaylorTwift/opencode/packages/plugin/src/v2/effect/event.ts
-
curl -L -o event.ts https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/plugin/src/v2/effect/event.ts
287 Bytes
| 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]> | |
| } | |