import { EventDelegate } from "./eventDelegate";

export class Event<T, K> extends Array<EventDelegate<T, K>> {
  constructor() {
    super();
  }
  public fire = (source: T, args: K) => {
    for (const delegate of this) {
      delegate(source, args);
    }
  };
}
