Skip to content

refactor(multiple): explicitly type untyped RxJS Subject instances - #34191

Open
jonathan-meier wants to merge 1 commit into
angular:mainfrom
jonathan-meier:type-untyped-rxjs-subjects
Open

jonathan-meier wants to merge 1 commit into
angular:mainfrom
jonathan-meier:type-untyped-rxjs-subjects

Conversation

@jonathan-meier

Copy link
Copy Markdown
Contributor

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.

@pullapprove
pullapprove Bot requested review from crisbeto and ok7sai November 27, 2026 00:46
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
jonathan-meier force-pushed the type-untyped-rxjs-subjects branch from af8945c to a90594c Compare November 27, 2026 01:35
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Nov 27, 2026

This branch has not been deployed

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

Labels

action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants