import { Subject } from 'rxjs'; import { StateMutation, Store } from './store'; export type StoreEvent = | { type: 'created'; store: Store; } | { type: 'destroyed'; store: Store; } | { type: 'mutation'; store: Store; mutation: StateMutation; nextState: State; prevState: State; } | { type: 'updated'; store: Store; nextState: State; prevState: State; }; /** @internal */ export const STORE_EVENT_BUS = new Subject>();