This is a JS port of jet's Equinox.
Equinox is a set of low dependency libraries that allow for event-sourced processing against stream-based stores handling:
- Snapshots
- Caching
- Optimistic concurrency control
First clone this repository and enter the directory
$ docker-compose up -d # starts message-db
$ pnpm install
$ pnpm build
$ pnpm test
Well, that's technically not true, we can approximate them as such:
type Data = { hello: "world" }
type Event = { type: "Something"; data: Data }
We can replace them with namespaces, but people will look at you funny for using them for some reason 🤷.
export namespace Events {
type Data = { hello: "world" }
export type Event = { type: "Something"; data: Data }
}