import { Event } from '@we-scrum/core'; import { Context } from './context'; export declare abstract class Aggregate { protected id: string; private handlers; constructor(); on(event: new () => E, handler: EventHandler): void; apply(event: E): void; protected publish(event: E, context: Context): void; } export interface EventHandler { (event: T): void; }