Make any type able to emit or detect custom events