mirror of
https://github.com/pmndrs/zustand.git
synced 2025-12-08 19:45:52 +00:00
make defaultEqualityFn optional (#2060)
This commit is contained in:
parent
8b242ce824
commit
368478bfcb
@ -65,11 +65,11 @@ export type UseBoundStoreWithEqualityFn<
|
||||
type CreateWithEqualityFn = {
|
||||
<T, Mos extends [StoreMutatorIdentifier, unknown][] = []>(
|
||||
initializer: StateCreator<T, [], Mos>,
|
||||
defaultEqualityFn: <U>(a: U, b: U) => boolean
|
||||
defaultEqualityFn?: <U>(a: U, b: U) => boolean
|
||||
): UseBoundStoreWithEqualityFn<Mutate<StoreApi<T>, Mos>>
|
||||
<T>(): <Mos extends [StoreMutatorIdentifier, unknown][] = []>(
|
||||
initializer: StateCreator<T, [], Mos>,
|
||||
defaultEqualityFn: <U>(a: U, b: U) => boolean
|
||||
defaultEqualityFn?: <U>(a: U, b: U) => boolean
|
||||
) => UseBoundStoreWithEqualityFn<Mutate<StoreApi<T>, Mos>>
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user