emits returns a function which will emit and parse the specified event.