fix(types): accept undefined equalityFn for the deprecated useStore (#1972)

This commit is contained in:
Daishi Kato 2023-08-07 08:24:29 +09:00 committed by GitHub
parent 19d3df22a6
commit 1a9b309844
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,7 +39,7 @@ export function useStore<S extends WithReact<StoreApi<unknown>>, U>(
export function useStore<S extends WithReact<StoreApi<unknown>>, U>(
api: S,
selector: (state: ExtractState<S>) => U,
equalityFn: (a: U, b: U) => boolean
equalityFn: ((a: U, b: U) => boolean) | undefined
): U
export function useStore<TState, StateSlice>(