Repository navigation
refactor(multiple): explicitly type untyped RxJS Subject instances - #34191
Merged
Merged
Conversation
Add explicit type arguments to untyped `new Subject()` instances whose `.next()` method is called with no arguments. In RxJS 7, `Subject.next(value: T)` requires an argument unless `T` is `void` (or includes `void`), so calling `.next()` with no arguments on an untyped `Subject<unknown>` fails to type-check. Typing these subjects explicitly fixes RxJS 7 compatibility without changing runtime behavior.
jonathan-meier
force-pushed
the
type-untyped-rxjs-subjects
branch
from
November 27, 2026 01:35
af8945c to
a90594c
Compare
crisbeto
approved these changes
Nov 27, 2026
Member
crisbeto
pushed a commit
that referenced
this pull request
Nov 27, 2026
…34191) Add explicit type arguments to untyped `new Subject()` instances whose `.next()` method is called with no arguments. In RxJS 7, `Subject.next(value: T)` requires an argument unless `T` is `void` (or includes `void`), so calling `.next()` with no arguments on an untyped `Subject<unknown>` fails to type-check. Typing these subjects explicitly fixes RxJS 7 compatibility without changing runtime behavior. Co-authored-by: Jonathan Meier <jome@google.com> (cherry picked from commit ae4e993)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add explicit type arguments to untyped
new Subject()instances whose.next()method is called with no arguments.In RxJS 7,
Subject.next(value: T)requires an argument unlessTisvoid(or includesvoid), so calling.next()with no arguments on an untypedSubject<unknown>fails to type-check. Typing these subjects explicitly fixes RxJS 7 compatibility without changing runtime behavior.