Evt.asPostable(evt)
Cast the passed event as portable.
Deprecated
Evt.asPostable() will be removed in the next major of Evt.
If you are currently using it, consider refactoring your code so that you don't need it anymore.
See this newer example. ( that replace the older one).
Usecase
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
.
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