MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / makeRecorder

Function makeRecorder

packages/core/analytics/src/engine.test.ts:14–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12type Recorded = { readonly name: AnalyticsEventName; readonly properties: unknown };
13
14const makeRecorder = () => {
15 const events: Recorded[] = [];
16 return {
17 events,
18 analytics: {
19 record: <Name extends AnalyticsEventName>(name: Name, properties: AnalyticsEvents[Name]) =>
20 Effect.sync(() => {
21 events.push({ name, properties });
22 }),
23 flush: Effect.void,
24 },
25 };
26};
27
28const completedResult = (error?: string): ExecutionResult => ({
29 status: "completed",

Callers 1

engine.test.tsFile · 0.70

Calls 2

pushMethod · 0.80
syncMethod · 0.65

Tested by

no test coverage detected