Closed jakearchibald closed 7 years ago
@appsforartists this is just the argument names, so when you .toString
it you get friendlier names in the reference implementation. Not an API change.
@appsforartists you're right, I didn't realise that the positional form was also supported.
Maybe the README could be updated to explain this? The definition of .subscribe
suggests that only the positional form works, whereas all the examples use the observer form.
It would definitely be more clear if they introduced Observer before Observable. I'm neither in TC39 nor an editor to this repo, so I have no expertise on spec text. Maybe @jhusain would accept a PR changing the order?
@benjamingr I know positional argument names don't matter - just trying to help Jake understand the subscribe
API. 😃
@jakearchibald I think you've confused the Observer API and the positional API.
I believe
subscribe(next, error, complete)
andsubscribe({ next, error, complete })
are both being proposed; the latter interface (with the named arguments) is called anObserver
and is already specified in the method above the one you've edited. You can see the shape ofObserver
towards the bottom of the README.