CreateStoreConfigType

Interface of the zustand config function provided to middlewares.

src/types.ts
import type {
  State,
  GetState,
  SetState,
  StoreApi,
  StateCreator,
} from 'zustand'

type CreateStoreConfigType<
  StoreDataType,
  StoreApiType extends StoreApi<StoreType<StoreDataType>> = StoreApi<
    StoreType<StoreDataType>
  >
> = StateCreator<
  StoreType<StoreDataType>,
  SetState<StoreType<StoreDataType>>,
  GetState<StoreType<StoreDataType>>,
  StoreApiType
>

Last updated