Open dead-claudia opened 6 years ago
I think option 2 makes sense. In that case, I think we should no longer throw a TypeError if the subscriber return value is not one of null
, undefined
, a function , or an object with an "unsubscribe" method (although we should still throw if the value has an "unsubscribe" property that is not callable).
I've create a PR for zen-observable based on this suggestion in https://github.com/zenparsing/zen-observable/pull/38.
It seems odd that ExecuteSubscriber both checks for
unsubscribe
early and accesses it later, unlike everywhere else in the spec. I feel it'd make more sense to:The second IMHO would make more sense, since it takes less memory and is more common in the rest of the ES spec.