export class LiteEvent < T1 , T2 > { private handlers : Array < ( sender : T1 , arg ? : T2 ) => void > = [ ] ; Expose ( ) { return this ; } Off ( handler ) { this . handlers = this . handlers . filter ( _handler => _handler !== handler ) ; } On ( handler ) { this . handlers . push ( handler ) ; } Trigger ( sender , args ? ) { this . handlers . forEach ( handler => handler ( sender , args ) ) ; } }