Skip to content

Commit

Permalink
StartStopNotifier type now requires update param
Browse files Browse the repository at this point in the history
This will be a breaking change for anyone who uses the StartStopNotifier
type in their custom stores.
  • Loading branch information
rmunn committed Sep 27, 2021
1 parent b2b7bd1 commit 2b638a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export type Updater<T> = (value: T) => T;
type Invalidator<T> = (value?: T) => void;

/** Start and stop notification callbacks. */
export type StartStopNotifier<T> = (set: Subscriber<T>, update?: (fn: Updater<T>) => void) => Unsubscriber | void;
export type StartStopNotifier<T> = (set: Subscriber<T>, update: (fn: Updater<T>) => void) => Unsubscriber | void;

/** Readable interface for subscribing. */
export interface Readable<T> {
Expand Down

0 comments on commit 2b638a5

Please sign in to comment.