UNPKG

woltage

Version:

A CQRS and Event-Sourcing Framework

17 lines (16 loc) 577 B
import { AsyncLocalStorage } from 'node:async_hooks'; import Event from './Event.ts'; import type ProjectionMap from './ProjectionMap.ts'; import type ReadModel from './read/ReadModel.ts'; type ProjectionStore = { isReplaying: boolean; currentEvent: Event; }; export declare const projectionStorage: AsyncLocalStorage<ProjectionStore>; type ExecutionStore = { readModelMap: Record<string, ReadModel>; projectionMap: ProjectionMap['activeProjectionMap']; context?: any; }; export declare const executionStorage: AsyncLocalStorage<ExecutionStore>; export {};