MCPcopy Create free account
hub / github.com/anomalyco/opencode / isGlobalEvent

Function isGlobalEvent

packages/opencode/src/cli/cmd/run/stream.transport.ts:175–182  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

173}
174
175function isGlobalEvent(value: unknown): value is GlobalEvent {
176 if (!value || typeof value !== "object" || Array.isArray(value)) {
177 return false
178 }
179
180 const payload = Reflect.get(value, "payload")
181 return !!payload && typeof payload === "object"
182}
183
184function globalPayloadEvent(value: unknown): Event | undefined {
185 if (!isGlobalEvent(value)) {

Callers 2

globalPayloadEventFunction · 0.85
isMatchingDisposeEventFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected