so I have been struggling with finding an answer, as to what is the correct syntax to pass an generic interface to a when calling a function that takes in a generic type.
What I want to do is const data = itemStore<T>(state => state.data)
import { create } from "zustand";
interface Item<T> {
count: number
data: T
}
const itemStore = create<Item<T>>()((set) => ({
count: 1,
data: "generic"
})