Type safe event listeners.