MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / getEventsByType

Method getEventsByType

sdk/e2e/utils/event-collector.ts:41–47  ·  view source on GitHub ↗

Get events by type

(
    type: T,
  )

Source from the content-addressed store, hash-verified

39
40 /** Get events by type */
41 getEventsByType<T extends PrintModeEvent['type']>(
42 type: T,
43 ): Extract<PrintModeEvent, { type: T }>[] {
44 return this.events.filter(
45 (e): e is Extract<PrintModeEvent, { type: T }> => e.type === type,
46 )
47 }
48
49 /** Check if a specific event type was received */
50 hasEventType(type: PrintModeEvent['type']): boolean {

Calls

no outgoing calls

Tested by

no test coverage detected