MCPcopy Index your code
hub / github.com/coder/mux / isTypedWorkspaceEvent

Function isTypedWorkspaceEvent

src/node/services/taskService.ts:736–745  ·  view source on GitHub ↗
(value: unknown, type: string)

Source from the content-addressed store, hash-verified

734}
735
736function isTypedWorkspaceEvent(value: unknown, type: string): boolean {
737 return (
738 typeof value === "object" &&
739 value !== null &&
740 "type" in value &&
741 (value as { type: unknown }).type === type &&
742 "workspaceId" in value &&
743 typeof (value as { workspaceId: unknown }).workspaceId === "string"
744 );
745}
746
747function isStreamEndEvent(value: unknown): value is StreamEndEvent {
748 return isTypedWorkspaceEvent(value, "stream-end");

Callers 3

isStreamEndEventFunction · 0.85
isStreamAbortEventFunction · 0.85
isErrorEventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected