Skip to content

Commit

Permalink
fix: wrap observed items in NotNullable
Browse files Browse the repository at this point in the history
  • Loading branch information
littensy committed Jul 12, 2023
1 parent e7d41fa commit 601baa1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,13 +334,13 @@ interface ProducerImpl<State, Actions> {
*/
observe<T>(
selector: (state: State) => T,
observer: (item: Values<T>, index: Keys<T>) => (() => void) | void,
observer: (item: NonNullable<Values<T>>, index: Keys<T>) => (() => void) | void,
): () => void;

observe<T>(
selector: (state: State) => T,
discriminator: ((item: Values<T>, index: Keys<T>) => defined) | undefined,
observer: (item: Values<T>, index: Keys<T>) => (() => void) | void,
discriminator: ((item: NonNullable<Values<T>>, index: Keys<T>) => defined) | undefined,
observer: (item: NonNullable<Values<T>>, index: Keys<T>) => (() => void) | void,
): () => void;

/**
Expand Down

0 comments on commit 601baa1

Please sign in to comment.