Skip to content

Commit ba2b0b1

Browse files
committed
fix(subscriber): strict Subscriber.next type signature
BREAKING CHANGE: Subscriber.next now takes strict argument
1 parent 3bc7a4e commit ba2b0b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/internal/Subscriber.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export class Subscriber<T> extends Subscription implements Observer<T> {
6868
* @param {T} [value] The `next` value.
6969
* @return {void}
7070
*/
71-
next(value?: T): void {
71+
next(value: T): void {
7272
if (this.isStopped) {
7373
handleStoppedNotification(nextNotification(value), this);
7474
} else {
@@ -203,7 +203,7 @@ export class SafeSubscriber<T> extends Subscriber<T> {
203203
// The first argument is a function, not an observer. The next
204204
// two arguments *could* be observers, or they could be empty.
205205
partialObserver = {
206-
next: (observerOrNext ?? undefined) as (((value: T) => void) | undefined),
206+
next: (observerOrNext ?? undefined) as ((value: T) => void) | undefined,
207207
error: error ?? undefined,
208208
complete: complete ?? undefined,
209209
};

0 commit comments

Comments
 (0)