Closed twe4ked closed 6 years ago
Hey @twe4ked stupid question incoming. (possibly missing some context I think) What scenario would this feature be useful in?
I was doing some reading on upcasting events and some of the patterns I found modified the event body and returned a different event type.
I might be jumping the gun a bit adding this functionality without actually using it. The reason I decided to open the PR is because I find it confusing at the moment that passing a type
to Event#with
is ignored. This essentially fixes that.
@twe4ked ah ha gotcha, didn't understand upcasters but just read Steves other PR so makes sense now.
So the use case would be that an upcasting function on an event may need to change the event type for whatever reason, can now do so easily. 👍
With typed events you can't change the event type, let's allow changing the event class.