Automatically inferring correct type in Zustand with Typescript I am following an example from Zustand with Typescript.