Evt.asPostable(evt)
Cast the passed event as portable.
Evt.asNonPostable() is the identity function with special type annotation
Use this method only onEvt
you instantiated yourself. Not as a hack to trigger events on Evt
that have been exposed as non-postable by an API.
To invoke post()
on a NonPostableEvt
or a StatefullReadonlyEvt
.
Usecase:
Without this method this would be the way for a class to expose Evt
that are posted internally and exposed to be listened.
Now it can be frustrating to have to store a private property only to call post on a object that we know is postable. Here is were this method come in handy:
Last updated