Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Completely fulfill the Observable spec in toObservable #132

Merged
merged 3 commits into from
Dec 20, 2022

Conversation

kitten
Copy link
Member

@kitten kitten commented Dec 20, 2022

The Observable spec should be completely fulfilled in the implementation of toObservable.

Specifically, the subscribe function must accept subscribe(onNext, onError, onComplete in its implementation, rather than just subscribe(observer)

Add the missing `subscribe(fn, fn, fn)` syntax, as such that the
following becomes a valid invocation.

```js
observable.subscribe(
  onNext,
  onError,
  onComplete
);
```

This is as per: https://github.com/tc39/proposal-observable#observable
@kitten kitten requested a review from JoviDeCroock December 20, 2022 16:28
@kitten kitten merged commit 5517a76 into main Dec 20, 2022
@kitten kitten deleted the feat/complete-observable-spec branch December 20, 2022 17:43
@github-actions github-actions bot mentioned this pull request Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants