import { AuguryEvent } from '../events' ; import { Projection } from './projection.interface' ; export abstract class EventProjection < Result > implements Projection < AuguryEvent , Result > { public abstract process ( event ) ; public collectResult ( ) { const result = this . getResult ( ) ; this . cleanup ( ) ; return result ; } protected abstract getResult ( ) ; protected abstract cleanup ( ) ; }