feat: version 2 beta

This commit is contained in:
2025-04-25 22:39:47 +00:00
commit 1e58359905
75 changed files with 6899 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import { describe as desc } from "@std/testing/bdd";
import { EventFactory } from "../../../libraries/event-factory.ts";
import { EventStore, type EventStoreHooks } from "../../../libraries/event-store.ts";
import { Projector } from "../../../libraries/projector.ts";
export function describe<TEventFactory extends EventFactory>(
name: string,
runner: (getEventStore: EventStoreFn<TEventFactory>) => void,
): (getEventStore: EventStoreFn<TEventFactory>) => void {
return (getEventStore: EventStoreFn<TEventFactory>) => desc(name, () => runner(getEventStore));
}
type EventStoreFn<TEventFactory extends EventFactory> = (options?: { hooks?: EventStoreHooks<TEventFactory> }) => Promise<{
store: EventStore<TEventFactory, any, any>;
projector: Projector<TEventFactory>;
}>;