Skip to content

7.8.2 introduces breaking changes #7536

Open

Description

@ilyakonrad

Describe the bug

Calling .next() with no arguments like this

new Observable((observer) => {
  observer.next()
}

shows error

Expected 1 arguments, but got 0.ts(2554)

Subscriber.d.ts(42, 10): An argument for 'value' was not provided.

Expected behavior

No breaking changes in patch version updates.

Version

7.8.2

Additional context

Duplicate of #7534.

Activity

  1. hakimio commented on Mar 4, 2025

    @hakimio

    I guess now you have to explicitly specify the generic type:

    new Observable<void>((observer) => {
      observer.next()
    }

    Either the default generic should be set to void (class Observable<T = void>) for the Observable or this breaking change should be postponed until v8.

  2. dgadelha commented on Apr 7, 2025

    @dgadelha

    The changelog mentions this as part of the 7.8.2 patch release:

    subscriber: strict type signature for next method (#7172) (0e2ef5e)

    Whereas the PR explicitly has on the description:

    BREAKING CHANGE: Subscriber.prototype.next now takes strict argument.

    Yet, it was released in a patch version.

  3. hakimio commented on Apr 7, 2025

    @hakimio

    @dgadelha
    Breaking changes do not belong in patch releases. This should have been postponed for next major or the typing introduced in a non-breaking way like I mentioned above with a good default.

  4. dgadelha commented on Apr 7, 2025

    @dgadelha

    @hakimio I'm with you! I just pointed out that the author of the PR explicitly mentioned this was a breaking change, yet it was still released as a patch version. I’ve updated my comment to make that clearer :)

  5. samwightt commented on May 13, 2025

    @samwightt

    Jumping in again, this is introducing type errors in our codebase where there were none previously. This is absolutely a breaking change and should've been included in a major version bump, along with guidance on how to remediate.

  6. SvetlaGeorgieva commented on Nov 27, 2025

    @SvetlaGeorgieva

    Yep, and the docs are incorrect at the moment, as they still mention usage of next() with no parameters, which is no longer allowed: https://rxjs.dev/guide/subject#void-subject

    We also experienced the breaking changes in our project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions