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

♻️ pass the Observable instance to the onFirstSubscribe callback #2539

Merged
merged 2 commits into from Jan 4, 2024

Commits on Dec 22, 2023

  1. ♻️ pass the Observable instance to the onFirstSubscribe callback

    This change mimics the [TC39 observable proposal][1] (and various
    implementations) by providing a way to notify directly as a
    onFirstSubscribe parameter.
    
    Contrary to the TC39 proposal and other implementations, it simply
    provide the observable instance, instead of introducing a new "observer"
    concept (Observable and Observer concepts are "merged" in our
    implementation).
    
    This is a simple quality of life improvement, but also fixes a typing
    issue I stumbled upon where TS claimed that the "observable" variable
    was not necessary defined when it referred to the outer scope variable.
    
    [1]: https://github.com/tc39/proposal-observable
    BenoitZugmeyer committed Dec 22, 2023
    Configuration menu
    Copy the full SHA
    710d164 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e5b05dd View commit details
    Browse the repository at this point in the history