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

Make subscribe callbacks optional in typings #548

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vlinder
Copy link

@vlinder vlinder commented Jan 21, 2021

Summary

Update docs and typescript typings to reflect that methods on the Observer all are optional.

Here is what is linked in the docs regarding the Observer: https://github.com/tc39/proposal-observable#observer

Flow types seem to be correct already.

most/src/index.js.flow

Lines 50 to 55 in bfed148

export type Subscriber<A> = {
+next?: (value: A) => void;
+error?: (err: Error) => void;
// complete value parameter is deprecated
+complete?: (value?: A) => void;
}

Todo

  • Unit tests for new or changed APIs and/or functionality
  • Documentation, including examples

According do the documentation All callbacks on the Observer interface are optional.
@vlinder vlinder changed the title Make subscribe callbacks optional Make subscribe callbacks optional in typings Jan 21, 2021
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.

1 participant