diff --git a/docs/guides/auto-generating-selectors.md b/docs/guides/auto-generating-selectors.md index 27f53203e..fe3066288 100644 --- a/docs/guides/auto-generating-selectors.md +++ b/docs/guides/auto-generating-selectors.md @@ -14,13 +14,13 @@ However, writing these could be tedious. If that is the case for you, you can au ## create the following function: `createSelectors` ```typescript -import { State, StoreApi, UseBoundStore } from 'zustand' +import { StoreApi, UseBoundStore } from 'zustand' type WithSelectors = S extends { getState: () => infer T } ? S & { use: { [K in keyof T]: () => T[K] } } : never -const createSelectors = >>( +const createSelectors = >>( _store: S ) => { let store = _store as WithSelectors