vitaly-t / sub-events

Lightweight, strongly-typed events, with monitored subscriptions.
https://vitaly-t.github.io/sub-events
MIT License
38 stars 2 forks source link

Add selfCancel flag to event onCancel #22

Closed vitaly-t closed 4 years ago

vitaly-t commented 4 years ago

If subscription event onCancel can accept a boolean flag selfCancel to indicate when it was a self-cancel request, versus cancelAll call, then some code can be simplified, like toPromise method.

It is a small improvement, for consideration.

vitaly-t commented 4 years ago

After a few attempts, found it not worth the effort.