This interface describes what should be returned by function passed to Observable constructor or static create function. Value of that interface will be used to cancel subscription for given Observable.
TeardownLogic can be:
Function that takes no parameters. When consumer of created Observable calls
that function will be called
AnonymousSubscription is simply an object with
unsubscribe method on it. That method
will work the same as function
If created Observable does not have any resources to clean up, function does not have to return anything.