support type-checking EventEmitter listeners (see #21)