EventCallbackEventCallback is a function that is called when an event is emitted. type EventCallback = <T>(...data: T[]) => void;