import { IEvent } from '@nestjs/cqrs' ; import { IViewUpdater } from './interfaces/view-updater' ; import { Type } from '@nestjs/common' ; export class ViewUpdaters { private static updaters = new Map < string , Type < IViewUpdater < IEvent > > > ( ) ; static add ( name , handler ) { ViewUpdaters . updaters . set ( name , handler ) ; } static get ( name ) { return ViewUpdaters . updaters . get ( name ) ; } }