Skip to content

Commit

Permalink
fix(subscriber): strict Subscriber.next type signature
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Subscriber.next now takes strict argument
  • Loading branch information
raveclassic committed Jan 25, 2023
1 parent 3bc7a4e commit ba2b0b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/internal/Subscriber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class Subscriber<T> extends Subscription implements Observer<T> {
* @param {T} [value] The `next` value.
* @return {void}
*/
next(value?: T): void {
next(value: T): void {
if (this.isStopped) {
handleStoppedNotification(nextNotification(value), this);
} else {
Expand Down Expand Up @@ -203,7 +203,7 @@ export class SafeSubscriber<T> extends Subscriber<T> {
// The first argument is a function, not an observer. The next
// two arguments *could* be observers, or they could be empty.
partialObserver = {
next: (observerOrNext ?? undefined) as (((value: T) => void) | undefined),
next: (observerOrNext ?? undefined) as ((value: T) => void) | undefined,
error: error ?? undefined,
complete: complete ?? undefined,
};
Expand Down

0 comments on commit ba2b0b1

Please sign in to comment.