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

7.8.2 introduces breaking changes #7536

Open
ilyakonrad opened this issue Mar 3, 2025 · 4 comments
Open

7.8.2 introduces breaking changes #7536

ilyakonrad opened this issue Mar 3, 2025 · 4 comments

Comments

@ilyakonrad
Copy link

ilyakonrad commented Mar 3, 2025

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.

@hakimio
Copy link

hakimio commented Mar 4, 2025

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.

@dgadelha
Copy link

dgadelha commented Apr 7, 2025

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.

@hakimio
Copy link

hakimio commented Apr 7, 2025

@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.

@dgadelha
Copy link

dgadelha commented Apr 7, 2025

@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 :)

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

No branches or pull requests

3 participants